Answer:
Step-by-step explanation:
The time required for an account earning compound interest to achieve a particular balance is given by the formula ...
 t = log(A/P)/(n·log(1 +r/n))
where principal P is compounded n times per year at annual rate r. A is the account balance after that time. For this problem, n=1.
__
Here, we have ...
 P = $2000, A = $2500, r = 0.05, n = 1
The number of years is ...
 t = log(2500/2000)/log(1.05) ≈ 4.57 . . . years
__
For A = $3000, this becomes ...
 t = log(3000/2000)/log(1.05) ≈ 8.31 . . . years