Three men were travelling in a railway compartment. One of them
was a very wealthy businessman. The other two had food with
them and invited the businessman to join them in their meal.
One man had brought 5 chapatis and the other had 3. The three
of them ate together and the food was shared equally.
On parting, the businessman gave 8 gold coins to the two men,
as a token of his appreciation of their hospitality, and told them
to share the coins in proportion to their contribution of food.
An argument started. The man who had brought 5 chapatis
felt that he should get 6 coins and the other man should get 2 coins. But the man who had brought 3 chapatis felt that he
should get 3 coins and the other man should get 5 coins.
How many gold coins should the man who had brought 5 chapatis get and how many coins should the man who had brought 3 chapatis get?
(Note: A chapati is Indian bread round in shape like a circle made of wheat flour)
You must explain your answer with mathematics and you may only submit one answer.