The polynomial $A(x)=x^4+2x^3-5x^2-22x-24$ is divisible by $B(x)=x^2+ax+b$.

Solution 1:

By plugging in small values of $x$ (for example $x=-2,-1,0,1,2,\ldots$), we can note that for $x=3$ and $x=-2\;$, $A(x)=0$. Hence by Rational root theorem $(x-3)(x+2)=x^2-x-6$ is a factor of $A(x)$. The other factor can be found by for example long division or other methods. The factorization will be , $$x^4+2x^3-5x^2-22x-24=(x^2-x-6)(x^2+3x+4)$$ Hence there are two set of values for $a$ and $b$.