Thay x=-1:
\(-1-a-b-2=0\)\(\Leftrightarrow a+b=-3\left(1\right)\)
Thay x=-2:
\(\left(-2\right)^3+a\left(-2\right)^2+\left(-2\right)b-2=-10+4a-2b=0\)\(\Leftrightarrow4a-2b=10\left(2\right)\)
Từ (1)(2):\(\left\{{}\begin{matrix}a+b=-3\\4a-2b=10\end{matrix}\right.\)\(\Rightarrow\left\{{}\begin{matrix}a=\frac{2}{3}\\b=\frac{-11}{3}\end{matrix}\right.\)