Danny had some $2 and $5 notes. He spent 3/5 of the $2 notes and 1/4 of the $5 notes on a present. As a result, he had $238 left. The total value of the $5 notes left was $182 more than the total value of the $2 notes left. Find the ratio of the number of $2 notes to the number of $5 notes Danny had at first?

number of $2 notes ---- x

number of $5 notes ---- y
total money he had = 2x + 5y

He spent 3/5 of the $2 notes and 1/4 of the $5 notes on a present. As a result, he had $238 left
... So he has left 2/5 of the 2's and 3/4 of the 5's left over.

(2/5)(2)x + (3/4)(5)y = 238
4x/55 + 15y/4 = 238
16x + 75y = 4760 #1

(3/4)(5)y - (2/5)(2)x = 182
15y/4 - 4x/5 = 182
75y - 16x = 3640
16x - 75y = -3640 #2
Add #1 and #2
32x = 1120
x = 35
sub into #1, 16x + 75y = 4760
16(35) + 75y = 4760
y = 56

so ration of
number of 2's : number of 5's
= 35 : 56
= 5 : 8