Five. (Full marks 25 points) Solve the equation
$$
x=\left(x^{2}+3 x-2\right)^{2}+3\left(x^{2}+3 x-2\right)-2 \text {. }
$$
Let $y=x^{2}+3 x-2$, then $x=y^{2}+3 y-2$.
Subtracting the two equations, we get
$$
\begin{aligned}
y-x & =\left(x^{2}+3 x-2\right)-\left(y^{2}+3 y-2\right) \\
& =(x-y)(x+y)+3(x-y) .
\end{aligned}
$$

That is, $(x-y)(x+y+4)=0$,
so $x-y=0$ or $x+y+4=0$.
If $x-y=0$, then $x=y$, substituting into $y=x^{2}+3 x-2$, we get $x$
$$
=-1 \pm \sqrt{3} \text {. }
$$

If $x+y+4=0$, then $y=-x-4$, substituting into $y=x^{2}+3 x-2$, we get $x=-2 \pm \sqrt{2}$.