The answer to this is that John's previous salary was right about $39,130. Here is how you can find this answer:
Set up the equation like this:
45000/x = 115/100
This is because the relationship between 45000 and x (the original salary) is the same as the relationship between 115 and 100 (the new salary is 115% of the old).
Now you can cross multiply. We will multiply 45000 by 100 and 115 by x. That leaves us with
4,500,000 = 115x
divide both sides by 115 and you get
x = 39,130.43