Answer
$$t \approx 9.90\ \ \ \text{years }$$
Work Step by Step
Given $$ P_0=4000,\ \ \ \ \ r=0.07 $$
We use the compound interest formula:
\begin{align*}
P(t)&=4000 e^{0.07 \cdot t}\\
8000&=4000 e^{0.07 \cdot t}\\
2&=e^{0.07 \cdot t}\\
\ln 2&=0.07 t
\end{align*}
Hence
$$t \approx 9.90\ \ \ \text{years }$$