Solution to the Problem:
The man who contributed 5 chapatis should get 7 coins and the man who contributed 3 chapatis should get 1 coin.
There were a total of 8 chapatis, so each man ate 2 2/3 chapatis.
The man with 5 chapatis ate 2 2/3, so he contributed 2 1/3 chapatis or 7/3 chapatis.
The man with 3 chapatis ate 2 2/3, so he contributed 1/3 chapatis.
Therefore they should be paid in the ratio of 7/3 : 1/3 or 7:1.