Be careful, $x=3$ is not a root. The curve does not cross the $x$-axis when $x=3$. There are only two roots: $x=-2$ and $x=0$.
You know that $(-2,0)$, $(0,0)$ and $(1,3)$ are all points on the curve.
You should substitute $x=-2$ and $y=0$ to get one equation. Then substitute $x=0$ and $y=0$ to get a second equation. Finally substitute $x=1$ and $y=3$ to get a third equation. Then solve these simultaneously.
As you rightly say: $(x,y)=(0,0)$ doesn't give you anything.
When we substitute $(x,y)=(-2,0)$ into $y=kx(x+a)^2$ we get $0=-2k(-2+a)^2$. So, either $k=0$ or $a=2$. Obviously $k \neq 0$ or the whole question would collapse from $y=kx(x+a)^2$ down to $y=0$ which can't be right because the original graph isn't the line $y=0$. That means $a=2$.
When we substitute $(x,y)=(1,3)$ into $y=kx(x+a)^2$ we get $3=k(1+a)^2$. We know that $a=2$, so this becomes $3=k(1+2)^2$, which in turn becomes $3=9k$. This tells us that $k=\frac{1}{3}$.
Given that $a=2$ and $k=\frac{1}{3}$, the equation $y=kx(x+a)^2$ becomes
$$\color{red}{y=\frac{1}{3}x(x-2)^2}$$