Lionel and Dennis each have some sweets. If Lionel gives 26 sweets to Dennis, both of them will have the same number of sweets. If Dennis gives 12 sweets to Lionel, the number of sweets that Lionel has to the number of sweets that Dennis has will be in the ratio of 5:1. How many sweets does each boy have?
[D - 12] - what Dennis gives to Lionel
[L + 12] - what Lionel receives from Dennis
[L - 26] ==[D + 26].................(1)
[L + 12] / [D - 12] ==5/1..........(2), solve for D, L
D ==31 sweets - that Dennis started with.
L==83 sweets - that Lionel started with.