Total earnings are the sum of a geometric series:
45900 + 45900(1.035) + 45900(1.035)^2 + ...45900(1.035)^(n-1)
The sum of this series is:
S = a(r^n - 1)/(r-1)
1,000,000 = (45,900)(1.035^n - 1) / (1.035 - 1)
n = 16.47 years
This means that the correct answer is 17 years (B). Note that after 16 years, the sum will not yet have reached 1,000,000.