I get a different answer from Melody on this one.....
Let x be the number of 50 cent coins in the beginning
Let y be the number of 20 cent coins in the beginning
Let x + 24 be the number of 10 cent coins in the beginning
And after the spree we have
x - 18 = the number of 50 cent coins
(2/5)(x + 24) = the number of 10 cent coins = the number of 20 cent coins
So the total coins left after the spree = 2(2/5)(x + 24) + ( x -18) = (4/5)(x + 24) + (x - 18)
And 40% of these = the number of 50 cent coins left .... so we have
.40[ (4/5)(x + 24) + (x - 18) ] = (x - 18)
(2/5)[ (4/5 (x + 24) + (x - 18) ] = (x - 18)
[ (4/5 (x + 24) + (x - 18) ] = (5/2)(x - 18) multiply through by 10
8(x + 24) + 10( x - 18) = 25(x - 18)
8x + 192 + 10x - 180 = 25 x - 450 simplify
18x + 12 = 25x - 450
462 = 7x divide by 7 on each side
x = 66 this is the number of 50 cent coins in the beginning
And x + 24 = (66 + 24) = 90 were 10 cent coins in the beginning
And notice that (3/4)y = (2/5) (x + 24)... so y = (8/15)(66 + 24) = (8/15)(90) = 48 coins
So....there were 48 20 cent coins originally
Now.....let's check the math....
The total number of coins after the spree =
[(4/5)(66 + 24) + (66 - 18) ] = 120
And (66 - 18) = 48 of these were 50 cent coins
So..... 48 / 120 = 40% were 50 cent coins
And after the spree....there were an equal number of 10 and 20 cent coins.....check ...(2/5)(90) = (3/4)(48) = 36 each
So the total spent = (3/5)(90)(.10) + (1/4)(48)(.20) + (18)(.50) = $16.80

I believe Melody has a slight error
She gets 210 10 cent coins at the start .....and 2/5 of these are left = 84 left
And this is equal to the number of 20 cent coins left
And she calculates the number of 50 cent coins left = 210 - 42 = 168
So....the total coins left = [ 84 + 84 + 168] = 336 coins left
But 168 / 336 = 50% of the coins left are 50 cent coins......and this is too much
Can anyone reconcile these differences ???