The general formula is
A = P ( 1 +

Where:
P = principal that becomes A in t years at the rate I% compound interest per annum.
Here the rate is 7% per annum (12 months)
So I is 1.75% per quarter (3 months)
So t will also be in quarters.
Put:
A = 45000
I = 1.75
t = 20 (since there are 20 quarters in 5 years)(5 years * 4 quarters per year)
45000 = P*

P =

=

≈$31807.12
Thus, the amount that should be invested is $31,807.12