So I'm a high school student and I'm stuck on a question. Please help.
$f(x)=(x-1)^2Q(x)+3x+1$
$f(x)=(x+2)Q(x)+4$
$f(x)=(x-1)^2(x+2)Q(x)+R(x)$
My first approach was Making $R(x)=ax^2+bx+c$, I soon found out that there are only two equations not three to find $a, b, c$
I don't understand how to solve this.
Here's another approach. $$f(x)=(x-1)^2Q_1(x)+3x+1 \tag 1 $$ $$f(x)=(x+2)Q_2(x)+4 \tag 2 $$ $$f(x)=(x-1)^2(x+2)Q_3(x)+R(x) \tag 3 $$ From (1) and (3), $(x-1)^2$ divides $R(x)-3x-1.$ Therefore, $$R(x)=k(x-1)^2+3x+1 \tag 4$$ By (2), $f(-2)=4.$ By (4) and (3), $$R(-2)=9k-6+1=f(-2)=4.$$ Thus, $k=1$ and $$R(x)=x^2+x+2.$$