<s>[INST] Finding polynomial given the remainders Question: Find a polynomial $f(x) \in \mathbb{Q} (x)$ of minimal degree that has both the following properties:
When $f(x)$ is divided by $(x-1)^2$, the remainder is $2x$; and when $f(x)$ is divided by $(x-2)^3$, the remainder is $3x$.
Answer provided: $f(x)=(x-2)^3 \cdot (4x-3)+3x$
Work so far: Okay, so I know this problem shouldn't be difficult, but I've been stumped. I know that this is probably a simple application of the division algorithm, where $f(x)=q(x) \cdot d(x)+r(x)$ but I can't seem to get an answer. The polynomial's minimum degree should be $4$, intuitively.
So I have that $f(x)=(x-1)^2 \cdot q_1(x) + 2x$ and $f(x)=(x-2)^3 \cdot q_2(x)+3x$. Then I know that for the second equation, $q_2(x)$ should be of form $(ax+b)$ for some $a,b \in \mathbb{Q}$, also I also applied the remainder theorem to find that $f(1)=4$ and that $f(2)=6$, and so 
$f(1)=4=(-1)^3 \cdot (a+b) +3(1) \rightarrow a+b=1$ 
so it makes sense that the answer is $q_2(x)=4x-3$, but I don't know how to get there after finding $a+b=1$. 
 [/INST] An alternative:
Note that if $f(x)$ satisfies the 2 properties, so does $f(x)-q(x-1)^2(x-2)^3, q \in \mathbb{Q}$. Thus the polynomial of minimal degree has degree 4. We have $f(x)=(x-2)^3(ax+b)+3x$. Note that $1$ is a repeated root of $f(x)-2x$, so $f(1)=f'(1)=2$. 
$2=f(1)=(-1)^3(a+b)+3$ so $a+b=1$. $f'(x)=3(x-2)^2(ax+b)+a(x-2)^3+3$ so $2=f'(1)=3(-1)^2(a+b)+a(-1)^3+3=6-a$ so $a=4, b=-3$.
Thus $f(x)=(x-2)^3(4x-3)+3x$
</s>