This question was asked in Ex 2.3, 3

On dividing x³-3x²+x+2 by a polynomial g(x), the quotient and remainder were x-2 and -2x+4, respectively. Find g(x).

Memon Qaid's image