\(\left(x^3+3x^2-ax+b\right):\left(x^2-2\right)\\ =\left(x^3-2x+3x^2-6+2x-ax+b+6\right):\left(x^2-2\right)\\ =\left[x\left(x^2-2\right)+3\left(x^2-2\right)+x\left(2-a\right)+\left(b+6\right)\right]:\left(x^2-2\right)\\ =x+3\left(\text{dư }x\left(2-a\right)+\left(b+6\right)\right)\)
Để phép chia hết thì \(\left\{{}\begin{matrix}2-a=0\\b+6=0\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}a=2\\b=-6\end{matrix}\right.\)