How long will it take for $4700 compounded semiannually at an annual rate of 1.5% to amount to $6200

Use the following formula for the amount of money obtained with a compounded interest:
[tex]A=P(1+\frac{r}{n})^{nt}[/tex]where,
A: amount earnt = 6200
P: principal = 4700
r: interest rate in decimal form = 0.015
n: times at year = 2 (semiannually)
Replace the previous values of the parameters into the formula for A, simplify and solve for t by using properties of logarithm, as follow:
[tex]\begin{gathered} 6200=4700(1+\frac{0.015}{2})^{2t} \\ 6200=4700(1.0075)^{2t} \\ \frac{6200}{4700}=(1.0075)^{2t} \\ 1.3191=(1.0075)^{2t} \\ \log _{1.0075}(1.32)=2t \\ t=\frac{1}{2}\log _{1.0075}(1.32) \\ t=\frac{1}{2}\cdot\frac{\log1.32}{\log1.0075} \\ t\approx18.5349 \end{gathered}[/tex]Hence, approximately 18.5349 years are necessary to obtain an amount of $6200