Finding the remainder when a polynomial is divided by a product of numbers whose remainders are known We have a polynomial $f(x)$ with rational roots that leaves remainders $15, 2x + 1$ when divided by the polynomials $x - 3, (x-1)^2$  respectively. What is the remainder when $f(x)$ is divided by $(x - 3)(x-1)^2$?
From the remainder theorem we know that, 
$f(3) = 15$.
I thought quite hard about this and tried various methods, but couldn't come up with anything useful. 

Write $$f(x)=A(x-3)(x-1)^2+B(x-1)^2+C(x-3)+D$$ where $A$ is an integer polynomial or constant
$\implies 15=f(3)=4B+D\implies D=15-4B$
$\implies f(x)=A(x-3)(x-1)^2+B(x-1)^2+C(x-3)+15-4B$
Now, $f(x)\equiv C(x-3)+15-4B\pmod{(x-1)^2}\equiv Cx+15-4B-3C $
But $f(x)\equiv 2x+1\pmod{(x-1)^2}$
$\implies C=2$ and $15-4B-3C=1$ and so on

HINT:
Write $$f(x)=A(x-3)(x-1)^2+Bx^2+Cx+D$$
$\implies 15=f(3)=9B+3C+D\ \ \ \ (1)$
Now, $f(x)\equiv Bx^2+Cx+D\pmod{(x-1)^2}\equiv(2B+C)x+D-B\pmod{(x-1)^2} $
But $f(x)\equiv2x+1\pmod{(x-1)^2}$
$\implies 2B+C=2\ \ \ \ (2)$ and $D-B=1\ \ \ \ (3)$
Can you solve for $B,C,D$ from $(1),(2),(3)$?
