<s>[INST] If $f(x)\mod (x-1)=5$, $f(x)\mod (x+1)=3$, $f(x)\mod (x+2)=5$ then find the remainder when $f(x)$ is divided by $x^3+2x^2-x-2$ 
If $f(x)\mod (x-1)=5$, $f(x)\mod (x+1)=3$, $f(x)\mod (x+2)=5$ then find the remainder when $f(x)$ is divided by $x^3+2x^2-x-2$    

I don't have any idea as to how to proceed with this question. I have figured out that $x^3+2x^2-x-2=(x-1)(x+1)(x+2)$.
But I don't know how to use this information to find the remainder $x^3+2x^2-x-2$ would give. A small hint as to how to proceed would be enough. 
 [/INST] Write $\ f = q\,g + r\ $ with $\,\deg r \le 2 = \deg g,\ $ by the Division Algorithm.
$\color{#0a0}5 \ =  f(1)\ =\ r(1)\ \ $  by $\ g(1)\ =0\ $
$\color{#0a0}5\! =\! f(-2)\!=\! r(-2)\ $ by $\ g(-2)\!=\!0,\ $ so $\ r = \color{#0a0}5 + \color{#c00}c\,(x\!-\!1)(x\!+\!2)$
$\!\begin{align} 3\! =\! f(-1)\!\! &=\! r(-1)\ \, {\rm by}\  \ g(-1)\! =\! 0\\
 &= 5+\color{#c00}c(-2)\ \Rightarrow\, \color{#c00}{c= 1}\ \Rightarrow\  r = 5\ +\ (x\!-\!1)(x\!+\!2)\end{align}$
</s>