Donuts and Candies

Huey has 3 donuts, Dewey has 5 donuts. Louie comes along and three of them split the donuts equally. In exchange, Louie offers 8 candies to Huey and Dewey. What is the fair way to split the candies?

Huey must take 1 chocolate, and Dewey must take 7. This is because each of them ate 8/3 donuts, and therefore Huey gave away 1/3 of his donuts, whereas Dewey gave away 7/3 of his donuts.