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)}$?

Answer: 
**Hint:** Let $P(x)=(x-1)(x-2)Q(x)+ax+b$. You know $P(1)$ and $P(2)$.
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.