For continuous compounding you need to let n—>∞
which turns A=P(1+r/n)nt into A=Pert
The amount of principal does not affect the doubling time, so I'll just leave it as P until we divide it out:
2P = Pe0.05t
2 = e0.05t (divided both sides by P)
ln(2) = 0.05t
Solve for t.
(I got approx 13.863 years)
If your teacher is insistent on using A=P(1+r/n)nt then a close approximation can be obtained by using a large n (say n=365 for daily compounding, your answer will be pretty close).