Polynomial remainder question If you divide the polynomial $p(x)$ by $x-1$ the remainder is $2$.
If you divide $p(x)$ by $x-2$ the remainder is $1$.
Which is the remainder of $\dfrac{p(x)}{(x-1)(x-2)}$?
 A: Hint: Let $P(x)=(x-1)(x-2)Q(x)+ax+b$. You know $P(1)$ and $P(2)$. 
A: Given information:
$$\frac{P(x)}{x-1} \ \text{has remainder $2$}$$
$$\frac{P(x)}{x-2} \ \text{has remainder $1$}$$
We need to find the remainder of:
$$\frac{P(x)}{(x-1)(x-2)}$$

Remainder theorem:
$$\dfrac{P(x)}{D(x)}=Q(x)D(x)+R(x)$$
Where $P(x)$ is the dividend, $D(x)$ is the divisor, $Q(x)$ is the quotient and $R(x)$ is the remainder. We also know that $R(x)$ has to be of a degree less than the divisor. In this case we have our equations:
$$\frac{P(x)}{x-1}=Q_{1}(x)+2$$
$$\frac{P(x)}{x-2}=Q_{2}(x)+1$$
$$\frac{P(x)}{(x-1)(x-2)}=Q_{3}(x)+ax+b$$
We can rewrite these equations:
$$P(x)=Q_{1}(x)(x-1)+2$$
$$P(x)=Q_{2}(x)(x-2)+1$$
$$P(x)=Q_{3}(x)(x-1)(x-2)+ax+b$$
Now what do we do? We can find out two values of $P(x)$. When you plug in a value of $x=1$ to the first equation, you get $P(1)=2$. When you plug in a value of $x=2$ to the second equation, you get a value of $P(2)=1$. Plugging in these values of $x$ into our last equation gives us:
$$2=a+b$$
$$1=2a+b$$
This is a system of equations. We can solve for $a$ and $b$ using elimination. Subtracting the second equation from the first one gives us:
$$1=-a$$
$$a=-1$$
Plugging in the value of $a$ to either equation...
$$2=-1+b$$
$$b=3$$
Therefore our remainder is:
$$-x+3$$
Hope I helped.
A: It's a simple case of the Chinese Remainder Theorem where the moduli $\,m,\, m\!+\!1\,$ differ by $1.\,$ 
$${\rm mod}\ (m,m\!+\!1)\!:\ \  \begin{array}{} m\!+\!1\equiv (1,0)\\
 \ \ {-}m\equiv (0,1)\end{array}\ \Rightarrow\,\begin{eqnarray}(a,b) &\equiv& a(1,0)+b(0,1)\\ &\equiv& a(m\!+\!1)-bm\end{eqnarray}\qquad\ $$
In your example $\ m,m\!+\!1 = x\!-\!2,x\!-\!1\,$ so $\,(a,b) = (\color{#c00}1,\color{#0a0}2)\equiv \overbrace{\color{#c00}1(x\!-\!1)-\color{#0a0}2(x\!-\!2)}\equiv 3\!-\!x$
Remark $\ $ The method in Andre's answer is equivalent to using (Lagrange) interpolation, which is a special case of the Chinese Remainder Theorem.
