A = A0 (1 + r /n) n*t where A is the accumulated amount, A0 is the initial investment, r is the interest rate in decimal form, n is the number of compoundings per year and t is the number of years.....so we have
2500 = 1000(1 + .045/12)12t divide both sides by 1000
2.5 = ( 1 + .045/12)12t take the log of both sides
log (2.5) = log ( 1 + .045/12)12t and we can write
log (2.5) = 12t log( 1 + .045/12) divide both sides by 12log( 1 + .045/12)
t = log(2.5) / [ 12log( 1 + .045/12) ] = about 20.4 years

Edited answer.......!!!!!