Starting off
Dave had D game cards
Perry had D + 72
Perry gave (1/3) of his cards to Dave
Dave now has (1/3)(D + 72) + D = (4/3)D + 24
Perry now has (2/3) (D + 72) = (2/3)D + 48
Dave then gave 3/8 of his cards to Perry
Dave now has (5/8) [ (4/3)D +24 ] = (5/6)D + 15
Perry now has (2/3)D + 48 + (3/8)[(4/3)D + 24] = (2/3)D + (1/2)D + 48 +9 = (7/6)D + 57
And the difference at the end was that Perry had 114 more cards than Dave
So
Perry's - Dave's = 114 in equation form we have
[ (7/6)D + 57] - [ (5/6)D + 15 ] = 114 simplify
(2/6)D + 57 -15 = 114
(1/3)D + 42 = 114
(1/3)D = 114 - 42
(1/3)D = 72 multiply through by 3
D = 216 = what Dave started with
D + 72 = 216 + 72 = 288 = what Perry started with
