Hi!

We know that and where and are two polynomials such that .

Thus, and .

The remainer, when dividing by can be of degree 1 at most since is a polynomial of degree 2.

This is, and

where is a polynomial of degree

We see that and but we know that and so we've to solve a linear system of equations in the unknowns a and b. It's easy to solve this system and the solution is

Therefore, the reaminder when is divided by is