A = final amount
P = initial amount (the amount deposited or invested)
r = interest rate (in decimal form)
n = compounding frequency
t = time in years
----------------------------
In this case,
A = 1000 (we want $1000 at the end of the time period)
P = unknown (we're solving for this)
r = 0.04 (from 4% interest)
n = 4 (compounded quarterly means compounded 4 times a year)
t = 5 (from 5 years)
-----------------------------
Plug those values into the equation and solve for P to get