\(\left(x^2+cx+2\right)\left(ax+b\right)=x^3-x^2+2\)
\(\Leftrightarrow x^3a+x^2b+x^2ac+xbc+2xa+2b=x^3-x^2+2\)
\(\Leftrightarrow x^3a+\left(b+ac\right)x^2+\left(bc+2a\right)x+2b=x^3-x^2+2\)
\(\Leftrightarrow\hept{\begin{cases}x^3a=x^3\\\left(b+ac\right)x^2=-x^2\\\left(bc+2a\right)x=0\end{cases}}\)
2b=2
\(\Leftrightarrow\hept{\begin{cases}a=1\\ac+b=-1\\2a+bc=0\end{cases}}\)
b=1
\(\Leftrightarrow\hept{\begin{cases}a=1\\1.c+b=c+b=-1\\2.1+1.c=2+c=0\end{cases}}\)
b=1
\(\Leftrightarrow\hept{\begin{cases}a=1\\c=-2\\c=1\end{cases}}\)