unknown polynomial divided by $x^2(x-1)$, find the remainder. I took an exam today and there's a problem stuck in my head; I still can't figure out yet.
Here's the question (just the concept as I can't remember precisely). 
An unknown polynomial divided by $(x-1)^2$ leaves the remainder of $x + 3$ (not sure about the number) and when this polynomial is divided by $x^2 $, it leaves $2x + 4$ (again, not sure about the number). From the given conditions, if this polynomial is divided by $(x-1)x^2$, what would be the remainder?
The solution as far as I figured out is this: 
first, from the division of $(x-1)^2$, I got that $f(1) = 3$
in the same way from division of $x^2$, I got $f(0) = 4.$
I can write the polynomial as follows: 
$f(x) = (x-1)(x)(x) g(x) + ax^2 +bx +c$
$ax^2 + bx + c$ is the remainder.  And to find $a,b,c$, I can use the conditions above, so I got $c = 4$ by substituting $x = 0,$ and I got $a+b+4 = 3$ by substituting $x = 1.$
This leaves $a + b = -1,$ and I can't figure out how to continue; please help.
Edit : I made a mistake $f(1)$ should be equal to $4$ and $a+b+c = 4$

Adapting the Extended Euclidean Algorithm, as implemented in this answer, to polynomial division and rotating to go down the page rather than across:
$$
\begin{array}{c|cc|c}
\color{#C00}{x^2}&\color{#C00}{1}&0\\
\color{#090}{x^2-2x+1}&0&\color{#090}{1}\\
2x-1&1&-1&1\\
\color{#C90}{\frac14}&\color{#C00}{-\frac12x+\frac34}&\color{#090}{\frac12x+\frac14}&\frac12x-\frac34\\
0&4x^2-8x+4&-4x^2&8x-4
\end{array}\tag1
$$
which says
$$
\overbrace{(2x+1)}^{4\left(\frac12x+\frac14\right)}(x-1)^2+\overbrace{(-2x+3)}^{4\left(-\frac12x+\frac34\right)}x^2=\overbrace{\ \quad1\ \quad}^{4\cdot\frac14}\tag2
$$
Therefore
$$
(2x+1)(x-1)^2\equiv\left\{\begin{align}1&\pmod{x^2}\\0&\pmod{(x-1)^2}\end{align}\right.\tag3
$$
and
$$
(-2x+3)x^2\equiv\left\{\begin{align}0&\pmod{x^2}\\1&\pmod{(x-1)^2}\end{align}\right.\tag4
$$
Thus, mod $x^2(x-1)^2$, the polynomial is
$$
\begin{align}
&(2x+4)\overbrace{(2x+1)(x-1)^2}^{(3)}+(x+3)\overbrace{(-2x+3)x^2}^{(4)}\\
&=2x^4-x^3-3x^2+2x+4\\
&\equiv3x^3-5x^2+2x+4&&\bmod x^2(x-1)^2\\
&\equiv-2x^2+2x+4&&\bmod x^2(x-1)\tag5
\end{align}
$$
which we can say since $\left.x^2(x-1)\,\middle|\,x^2(x-1)^2\right.$.
