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