100%:2000$=4.5%:x$, x=90$. After 1st year I earned 90$, now I have 2090$.
100%:2090$=4.5%:x$, x=94.5$. After 2nd year I earned 94.5$ more, now I have 2184.05$.
100%:2184.05$=4.5%:x$, x=98.28$. After 3rd year I have 2282.33$.
100%:2282.33$=4.5%:x$, x=102.71$. After 4th year I have 2385.04$.
100%:2385.04$=4.5%:x$, x=107.33$. After 5th year I have 2492.37$.
So I need 6 years to earn 495$.