Answer
$$f(x)= \frac{1}{3}(x+1)^3+ \frac{25}{3}$$
Work Step by Step
Given: Slope$=(x+1)^2$ and passes through $(-2,8)$
Since the curve is given by
\begin{align*}
f(x)&=\int (x+1)^2dx\\
&=\frac{1}{3}(x+1)^3+c
\end{align*}
Since the curve passes through $(-2,8)$, then $c=25/3$ and
$$f(x)= \frac{1}{3}(x+1)^3+ \frac{25}{3}$$