Answer :
[tex]f(x)=(x-2)(x-3)Q(x)+ax+b[/tex]
Recall the polynomial remainder theorem: the remainder upon dividing a polynomial [tex]p(x)[/tex] by [tex]x-c[/tex] is equal to [tex]p(c)[/tex]. This means that [tex]f(2)=4[/tex] and [tex]f(3)=7[/tex], which tell us
[tex]4=2a+b[/tex]
[tex]7=3a+b[/tex]
From here we can solve for [tex]a,b[/tex]:
[tex]4=2a+b\implies b=4-2a[/tex]
[tex]7=3a+b=3a+(4-2a)\implies a=3\implies b=-2[/tex]
so that
[tex]f(x)=(x-2)(x-3)Q(x)+3x-2[/tex]
Now,
[tex]\dfrac{f(x)}{(x-2)(x-3)}=Q(x)+\dfrac{3x-2}{(x-2)(x-3)}[/tex]
so the remainder upon dividing [tex]f(x)[/tex] by [tex](x-2)(x-3)[/tex] is [tex]3x-2[/tex].
Next, if [tex]f[/tex] is a cubic function, then [tex]Q(x)[/tex] is a linear polynomial that can be written as [tex]Q(x)=cx-d[/tex]. The coefficient of [tex]x^3[/tex] in [tex]f(x)[/tex] is 1 (unity), so that expanding [tex]f(x)[/tex] gives us
[tex]f(x)=(x-2)(x-3)(cx-d)+3x-2[/tex]
[tex]f(x)=(cx^3-(5c+d)x^2+(6c+5d)x-6d)+3x-2[/tex]
[tex]f(x)=cx^3-(5c+d)x^2+(6c+5d+3)x-(6d+2)[/tex]
[tex]\implies c=1[/tex]
and we also have that [tex]f(1)=1[/tex], so that
[tex]1=1-(5+d)+(6+5d+3)-(6d+2)[/tex]
[tex]\implies2d=2\implies d=1[/tex]
so that
[tex]Q(x)=x-1[/tex]