If we want to find when the population of species A will be equal to the population of species B, we need to see when the two equations for the population of each species are equal, ie. equate them and solve for t. Thus:
2000e^(0.05t) = 5000e^(0.02t)
(2/5)e^(0.05t) = e^(0.02t) (Divide each side by 5000)
2/5 = e^(0.02t) / e^(0.05t) (Divide each side by e^(0.05t))
2/5 = e^(-0.03t) (use: e^a / e^b = e^(a - b))
ln(2/5) = -0.03t (use: if b = a^c, then loga(b) = c )
t = ln(2/5) / -0.03 (Divide each side by -0.03)
= 30.54 (to two decimal places)
Therefor, the population of species A will be equal to the population of species B after 30.54 years.
I wasn't entirely sure about the rounding requirements so I've left it rounded to two decimal places.