Answer: -3x + 8 should be your answer! A good way to get quick answers for questions like these would be https://www.cymath.com/answer.php which I just used to answer this question, hope it helps!
Set the equation to look like
20/100 = x/25
Then multiply to get
500 = 100x
500/100 = x
5 = x
Therefore James spent 5 dollars initially on ingredients.