How to find the value of $a$ and $b$ in polynomials

Here is a question from NCERT-Exampler pg-15 question no. 6

For what value of $a$ and $b$, are the zeros of $q(x)=x^3+2x^2+a$ also the zeros of polynomial $px(x)=x^5-x^4-4x^3+3x^2+3x+b$ ? Which zeros of $p(x)$ are not the zeros of $q(x)$?

$a=-1, b=-2$; 1 and 2 are the zeros of $q(x)$but not the zeros of $p(x)$

now how to solve this question...

please help me to short out with this problem and it would be so kind if you show me steps how you have done this and please take this very urgent because tomarrow is my test...

-
$\displaystyle x^5-x^4-4x^3+3x^2+3x+b=(x^3+2x^2+a)(x^2-3x)+(3-a)x^2+(3+3a)x+b$ If $y$ is one of the common roots, $\displaystyle y^5-y^4-4y^3+3y^2+3y+b=(y^3+2y^2+a)(y^2-3y)+(3-a)y^2+(3+3a)y+b$ $\displaystyle\implies (3-a)y^2+(3+3a)y+b=0$ and $y^3+2y^2+a=0$ – lab bhattacharjee May 12 '14 at 15:00

All the zeros of $q$ are also among the zeros of $p$ if and only if $p(x)=r(x)q(x)$. So you want to do a long division of the cubic into the quintic, and see what the conditions on $a$ and $b$ are for the remainder to be zero.
@anni Note that the claim is true only if one accounts for multiplicities of roots, else e.g. all the zeros of $\,x^2\,$ are among those of $\,x,\,$ but $\ x \ne x^2 r(x)\,$ for a polynomial $\,r(x)\in \Bbb C[x].\,$ But the idea of using the polynomial Division Algorithm and Remainder Theorem does work here. Where are you stuck? – Bill Dubuque May 12 '14 at 15:36