Ta có: \(\left(x^2+2x+3\right)^2-9\left(x^2+2x+3\right)+18=0\)
\(\Leftrightarrow\left(x^2+2x+3\right)^2-3\left(x^2+2x+3\right)-6\left(x^2+2x+3\right)+18=0\)
\(\Leftrightarrow\left(x^2+2x+3\right)\left(x^2+2x+3-3\right)-6\left(x^2+2x+3-3\right)=0\)
\(\Leftrightarrow\left(x^2+2x+3-6\right)\left(x^2+2x\right)=0\)
\(\Leftrightarrow\left(x^2+2x-3\right)\cdot x\cdot\left(x+2\right)=0\)
\(\Leftrightarrow\left(x^2+2x+1-4\right)\cdot x\cdot\left(x+2\right)=0\)
\(\Leftrightarrow\left(x+1-2\right)\left(x+1+2\right)\cdot x\cdot\left(x+2\right)=0\)
\(\Leftrightarrow\left(x-1\right)\left(x+3\right)\cdot x\cdot\left(x+2\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x-1=0\\x+3=0\\x=0\\x+2=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=1\\x=-3\\x=0\\x=-2\end{matrix}\right.\)
Vậy: \(x\in\left\{1;-3;0;-2\right\}\)