Ooops....sorry, I had the words FOOD and DRINKS reversed in my original answer (but the math is the same)
Well, what we are looking for is theoriginal amount of money Eric had.....let's call that amount 'x'
He spent 20% of 'x' or 0.20x which left him with 80 percent of 'x' (or 0.8x) after his first purchase of FOOD.
Then he spent 30% of what he had left (80 percent of 'x' ...or 0.8x )
SO for DRINKS he spent 0.3 (0.8x)
and THEN he had only $28 dolllars left.....in equation form this looks like this:
x - 02.x - .3(.8x) = 28 then just solve for 'x'
x - .2x -.24x = 28
x - .44x = 28
.56x = 28 (now divide both sides by .56)
(.56x)/.56 = 28/(.56)
x = 50 dollars