hmm my maths may be a little shaking, nut basicallly here is my working for the answer.
ok 8 loafs between 3 guys. 8/3 = 2.66 loafs each abouts
one guy has 3 loafs so 3 - 2.66= 0.33 of his loaf was unaccounted for.
the other guy has 5 loafs. 5 - 2.66 = 2.33
so he had 2.33 loafs accounted for
then theres a total of 2.66 loafs which the other guy ate and is gonna consequently pay for, by the 8 coins. He then would've had 0.33 of one guys loaf and 2.33 of the other guys loaf.
maths again
2.33/2.66 = 0.8759 and 0.33/2.66 = 0.124
ok nows that the percentage of the total payment each should get.
edit: ignore the rounding errors, i just did it with my trusty calc and it works out exact...pretty sure its right as well.
.8759*8 = 7
0.124*8 = 1
therefore the guy with 5 loafs gets 7 coins and the guy with 3 loafs gets 1 coin.
i guess. Is that right. Sorry if my maths and explanation is a little shady, it was my first go