The expressions $\displaystyle x^3-7x+6$ and $\displaystyle x^3-x^2-4x+24$ have the same remainder when divided by $\displaystyle (x+p)$

Find the possible values of $\displaystyle p$.

what i did

$\displaystyle

-p^3-7(-p)+6=(-p^3)-(-p)^2-4(-p)+24

$

$\displaystyle

-p^3+7p+6=-p^3-p^2+4p+24

$

$\displaystyle

-p^3+7p+6-[-p^3-p^2+4p+24]=0

$

$\displaystyle

p^2+3p-18=0

$

$\displaystyle

p=3,-6

$

however, ans is 3,-3!!