Let $P$ be a polynomial such that the remainder of the Euclidean division of $P$ by $x-1$ is 2 and the remainder of the Euclidean division of $P$ by $x-2$ is 1. What is the remainder of the Euclidean division of $P$ by $(x-1)(x-2)$?
According to the hypotheses, $P(1)=2$ and $P(2)=1$. Let's write the Euclidean division of $P$ by $(x-1)(x-2): P(x)=Q(x)(x-1)(x-2)+a x+b$ with $a, b \in \mathbb{R}$ which need to be determined. By setting $x=1$ we get $2=P(1)=a+b$ and $1=P(2)=2 a+b$. From this, we deduce that $a=-1$ and $b=3$. Therefore, the remainder of the Euclidean division of $P$ by $(x-1)(x-2)$ is $-x+3$.