Answer:
8 pies and 2 coffees must have been bought.
Explanation:
Given that:
10 men bought either a pie or a cup of coffee.
Cost per pie = 60p
Cost per coffee = 50p
Total amount spent = £5.80 * 100 = 580p
Let,
x be the number of pies
y be the number of coffees
According to given statement;
x+y = 10 Eqn 1
60x+50y=580 Eqn 2
Multiplying Eqn 1 by 50
50(x+y=10)
50x+50y=500 Eqn 3
Subtracting Eqn 2 from Eqn 3
(60x+50y)-(50x+50y) = 580-500
60x+50y-50x-50y=80
10x=80
Dividing both sides by 10

Putting x=8 in Eqn 1
8+y=10
y=10-8
y=2
Hence,
8 pies and 2 coffees must have been bought.