Answer: 35 years
Step-by-step explanation:

Where,
A - the ending amount,
P - the beginning amount (or "principal")
r - the interest rate (expressed as a decimal)
n - the number of compounding a year
t - the total number of years
n=1, t=?, P = $50,000, r=0.09, A= $1,000,000
Therefore,



Taking log on both sides
log(20) = t log(1.09)
1.30103 = 0.0374264979 t
t = 34.7622
So answer is 35 years.