$\noindent Rearranging and integrating, $\int \left(x+4\right) \text{ d}x = \int \text{ d}t \Rightarrow \frac{1}{2}x^2 + 4x = t + C$. When $t=0$, $x=0$, so $C=0$. So $\frac{1}{2}x^2 + 4x = t$. So when $x=2$, $t=\frac{1}{2}\times 2^2 + 4\times 2 = 2+8 = 10$.$
Edit: Done above.
(Btw, it's SHM...