I'm not sure why are you trying to use the "compounding function".
In terms of population, what you call compounding function (whos name comes from interest rate calculation I believe) comes from what's called the Malthusian Growth Model, wich states that the rate of change of a population is proportional to the current population number, in other words:
$$
N'(t) = k N(t),
$$
where $N(t)$ is the population at time $t$ and $k$ is the rate of growth.
In your case
$$
N(t) = 500\left(1 + \frac{4t}{50 + t^2}\right).
$$
Taking the derivative, the rate of change is
$$
N'(t) = 500\left(\frac{4}{50+t^2} - \frac{8t^2}{(50+t^2)^2}\right)
$$
wich hardly is a malthusian growth.
A visual study
One can see the way the population of bacteria behaves by looking the plot of $t\,vs.\,N(t)$
We can observe that the population at $t=0$ is $N(0) = 500$ and starts to grow. There is a time $t_c$ where the population can't sustain the growth (lack of space, food, you name it), and the population starts to diminish, only to stabilize again, with the original number of bacteria.
The maxmimum of population occurs when $N'(t) = 0$, wich can be calculated straightforward, giving $t_c = \sqrt{50}$ and $N_{max} \approx 641$ bacteria.
This means that, at time $t=2$ the growth must be positive, and given by the rate of change of the population in time, i.e. the derivative, wich was computed above. Hence, at $t=2$, the rate of growth is
$$
N'(2) \approx 31.55,
$$
meaning that at $t=2$ the population is growing roughly by 31 bacteria per time unit.
At the end, one can suppose that the function $N$ is modeling the growth of bacteria in a petri dish, where some nutrient was placed, giving a suddent growth, and when the nutrient has been finished, the extra population becomes unsustainable returning to it's original equilibrium.
Malthusian Growth
In the case of malthusian growth, it is supposed that the change in population is proportional to the current population, i.e.
$$
N'(t) = k N(t),
$$
where $k$ is the rate of growth, and depends on the type of population (different for ants and whales).
The solution of the ode is
$$
N(t) = N_0 e^{k t},
$$
where $N_0$ is the population at time $t = 0$.
If $k > 0$, then the population grows exponentially (blue), if $k < 0$ it decreases exponentially (red).
When $k > 0$, $k$ is also called birth rate, while $k < 0$ means mortality.
Malthus model is unrealistic first of all because it predicts that populations grow indeterminately, wich is false (in the times of Malthus this was sort of an accepted truth), but most importantly because it neglects factors as competition, deceases, food, space, etc.
What you calculated
The $r$ you calculated is the rate of growth a malhtusian population must possess in order to achive the same number of individuals as the bacteria colony at time $t=2$.
If we plot the malthusian population (blue), against the bacteria (red) using your parameters we see
The intersection is in $t=2$.
Best Answer
The "doubling time" becomes $\dfrac{20}{50} = \dfrac{2}{5}$ units, so $$N(t) = 12\cdot 2^{t/(2/5)} = 12 \cdot 2^{\Large\left(\frac{5t}{2}\right)} = 12\cdot2^{(2.5t)}$$