From the question, we can see that it's compound interest and we will use compound interest formular to compound it.
A = P(1+r/n)^rt
r = 12% = 0.12
n = 12 --> compounded monthly
We want A = 2P (double your money)
2P = P(1 + 0.12/12)^0.12t
2 = (1 + 0.01)^0.12t
2 = (1.01)^0.12t
Using log
log2 = log(1.01)^0.12t
log2 = (0.12t) log1.01
making t subject of formular
t = log2
0.12 log1.01
t = log2
log1.01^0.12
t = 0.301030
log1.00119475
t = 0.301030
0.0005185
t = 583.6 years.
Compounded continuously
A = P.e^rt
recall, we want A = 2P, r = 12% = 0.12
2P = P.e^0.12t
2 = e^0.12t
using natural log
ln(2) = ln(e^0.12t)
ln(2) = (0.12t) . ln(e)
ln(2) = (0.12t) . 1
0.12t = ln(2)
t = ln(2)
0.12
t = 0.693147
0.12
t = 5.8 years