Find the values of real numbers $\displaystyle a$ and $\displaystyle b$ such that:

$\displaystyle x^4 +4x^3+ax^2-b$ is divisible by both $\displaystyle (x-1)$ and $\displaystyle (x+2)$

Do I need to extract the factors (x-1) and (x+2) FIRST and then try to solve for a and b or how do I start?

Also, the answers provided are a = 7 and b = 12 but when I try to divide $\displaystyle (x-1)$ into $\displaystyle x^4+4x^3+7x^2-12$ I get a remainder of 1 which means that it does not divide it and a and b are incorrect values right?