Let the remainder be ax + b. Then by the factor theorem, a = 4 and b = -1, so the remainder is 4x - 1.
On division by (x - 1)(x - 2) we would have
\(\displaystyle \frac{f(x)}{(x-1)(x-2)}=q(x)+\frac{r(x)}{(x-1)(x-2)},\)
where q(x) is of degree two less than f(x) and r(x) is linear, ax + b say.
Multiply throughout by (x - 1)(x - 2) to get
\(\displaystyle f(x)=q(x)(x-1)(x-2)+ax + b\)
and now substitute x = 1 and x = 2.
That gets you
\(\displaystyle f(1)=2=a+b,\\ f(2)=3=2a +b.\)
Solve those simultaneously to get a = 1 and b = 1.