The formula is
A=p (1+r/k)^kt
A future value 30000
p present value 20000
R interest rate 0.15
K compounded quarterly 4
T time?
30000=20000 (1+0.15/4)^4t
Solve for t
Divide both sides by 20000
30000/20000=(1+0.15/4)^4t
Take the log of both sides
Log (30000/20000)=4t×log (1+0.15/4)
Divide both sides by log (1+0.15/4)
4t=Log (30000/20000)÷log (1+0.15/4)
Divide both sides by 4
T=(log(30,000÷20,000)÷log(1+0.15÷4))÷4
T=2.7 years round your answer to get 3 years
Hope it helps!