Answer
The general solution to the problem $p' = rp$ is : $$p = p(t) = ce^{rt},$$ where $r$ is the growth-rate constant, $c$ is a constant depending on the initial mice population and $t$ corresponds to the number of days.
$a)$ If the mice population doubles in $30$ days, we have $r = ln(2)/30$.
$b)$ If the mice population doubles in $N$ days, we have $r = ln(2)/N$.
Work Step by Step
First, we find a general solution to the problem $p' = rp$, where $p' = dp/dt$ and $r$ is the growth-rate constant.
If we suppose $p \neq 0$, we can rewrite the equation as $p'/p = r$.
Then, we notice that $p'/p = (ln(\lvert p \rvert))' = r$.
By integrating both sides of the equality relatively to $t$, we get that $ln(\lvert p \rvert) = rt + C$, where $C$ is the integration constant.
By applying the exponential function to both sides of the equality, we get that $\lvert p \rvert = e^Ce^{rt}$.
Since the exponential function e$^x$ is always positive, either $p$ is always positive, or always negative, so we get $p = e^Ce^{rt}$ or $p = -e^Ce^{rt}$. We rewrite that as $p = p(t) = ce^{rt}$, where $c$ is a constant depending on the initial condition (here, it would depend on the initial mice population).
$a)$ Let's say that $t$ corresponds to the number of days. The condition "the population doubles in $30$ days" gives us the equation : $p(30) = ce^{30r} = 2p(0) = 2ce^{0r} = 2c \iff e^{30r} = 2$.
By applying the natural logarithm to both sides of the equality, we get $30r = ln(2) \iff r = ln(2)/30.$
$b)$ More generally, if "the population doubles in $N$ days", we have $p(N) = ce^{Nr} = 2p(0) = 2c \iff e^{Nr} = 2$, which gives us, as we did above, $r = ln(2)/N$.