For an initial amount P invested at an annually compounded interest rate r, after t year the total amount is given by:
[tex]A=P(1+r)^t[/tex]Then we have:
[tex]\begin{gathered} \frac{A}{P}=(1+r)^t \\ \ln\frac{A}{P}=t\ln(1+r) \\ \ln(1+r)=\frac{1}{t}\ln\frac{A}{P} \\ 1+r=e^{\frac{1}{t}\ln\frac{A}{P}} \\ r=e^{\frac{1}{t}\ln\frac{A}{P}}-1 \end{gathered}[/tex]Therefore, for P - $5,000, A = $38,700 and t = 7 years, we have:
[tex]r=e^{\frac{1}{7}\ln\frac{38700}{5000}}-1\approx0.3396=33.96\%[/tex]