Answer:

The trick to this question is to figure out just how much bread each person ate compared to how much they contributed.
There were 8 loaves total split among the 3 of them. Thus, each ate 8/3 loaves.
Bedouin #1 had 5 loaves, or 15/3.
Bedouin #2 had 3 loaves, or 9/3.
Bedouin #1 ate 8/3 of his own 15/3, and gave the other 7/3 away.
Bedouin #2 ate 8/3 of his own 9/3, giving away 1/3.

So, Bedouin #1 should get 7 gold coins and Bedouin #2 should get 1 gold coin.