Let $P=(x,y)\in E(\mathbb{F}_p)$ by a Weierstrass equation $y^2=x^3+ax+b$. Show that $3P=\mathcal{O}$ iff $3x^4+6ax^2+12bx-a^2=0$.
I derived that every point in $\{P\in E(\mathbb{F}_p)|3P=\mathcal{O}\}$ is a root of the above equation, then no further clue. I also tried to from $y^2=x^3+ax+b$ to yield $3x^4+6ax^2+12bx-a^2=0$, but not sure is the right approach because I can't find a way to do it.
Any help or hints will be great, thanks.