$\begin{align*} & f^{''}\left( x\right) =6x+8\\ & f'\left( x\right) =3x^{2}+c_{1}\end{align*} $
$\begin{align*} & f'\left( 1\right) =6\\ & f'\left( 1\right) =3+c_{1}=6\\ & c_{1}=3\end{align*} $
$\begin{align*} & f'\left( x\right) =3x^{2}+3\\ & f\left( x\right) =x^{3}+3x+c_{2}\\ & f\left( 1\right) =2\end{align*}$
$\begin{align*} & f\left( 1\right) =1+3+c_{2}=2\\ & c_{2}=-2\\ & f\left( x\right) =x^{3}+3x-2\end{align*}$