2. A polynomial $p(x)$, when divided by the polynomial $x-1$, gives a remainder of 2, and when divided by the polynomial $x-2$, gives a remainder of 1. Find the remainder obtained when the polynomial $p(x)$ is divided by $(x-1)(x-2)$.
Solution. According to the conditions of the problem, we have $p(x)=q_{1}(x)(x-1)+2$ and $p(x)=q_{2}(x)(x-2)+1$, from which it follows that $p(1)=2$ and $p(2)=1$. Let $q(x)$ be the quotient, and $r x+s$ the remainder obtained when dividing the polynomial $p(x)$ by $(x-1)(x-2)$. We have

$$
p(x)=q(x)(x-1)(x-2)+r x+s
$$

from which it follows that $p(1)=r+s, p(2)=2 r+s$. Since $p(1)=2, p(2)=1$, we get

$$
r+s=2,2 r+s=1, \text { i.e. } r=-1, s=3
$$

Thus, the remainder obtained when dividing $p(x)$ by $(x-1)(x-2)$ is $-x+3$.