(X^2+AX+8)(X^2-3X+B)
=X^4-3X^3+BX^2+AX^3-3AX^2+ABX+8X^2-24X+8B
=X^4-(3-A)X^3+(B-3A+8)X^2+(AB-24)X+8B
3-A=0,B-3A+8=0
A=3,B=1