I would suggest using a model to better illustrate the
problem.
But here's the algebra method
let original no. of $5 notes be x
let original no. of $2 notes be 1/3 x
5(x-28) = 1/3 x
15(x-28) = x
14x = 420
x = 30
value of remaining $5 notes = (30-28) * 5 = $10
value of remaining $2 notes = (30/3) * 2 = $20
Total value= $30