So for Tom to get his free meal he needs to spend 50 dollars.
This means the following⬇️

This equation is the 50 dollars he has to spend minus the 30.25 he has already spent which results in⬇️

This results in Tom needing to still spend 19.75 more dollars to get his free meal!!
Hope this helped!!