6.145. $(x+1)^{2}(x+2)+(x-1)^{2}(x-2)=12$.

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.

6.145. $(x+1)^{2}(x+2)+(x-1)^{2}(x-2)=12$.
## Solution.

We have:

$$
\begin{aligned}
& \left(x^{2}+2 x+1\right)(x+2)+\left(x^{2}-2 x+1\right)(x-2)-12=0 \Leftrightarrow \\
& \Leftrightarrow x^{3}+2 x^{2}+2 x^{2}+4 x+x+2+x^{3}-2 x^{2}-2 x^{2}+4 x+x-2-12=0 \\
& 2 x^{3}+10 x-12=0, x^{3}+5 x-6=0
\end{aligned}
$$

The last equation can be rewritten as:

$x^{3}+5 x-5-1=0,\left(x^{3}-1\right)+5(x-1)=0,(x-1)\left(x^{2}+x+1\right)+5(x-1)=0$, $(x-1)\left(x^{2}+x+6\right)=0$, from which $x-1=0, x_{1}=1$, or $x^{2}+x+6=0, D<0$ and there are no roots.

Answer: $x=1$.