Find $p, q$ such that polynomial $P(x) = 6x^4 - 7x^3 + px^2 + 3x + 2$ is divisible by $x^2 - x + q$ I'm having difficulties with this problem:
Find $p, q$ such that polynomial $P(x) = 6x^4 - 7x^3 + px^2 + 3x + 2$ is divisible by $x^2 - x + q$.
I'm aware of the Bezout's Theorem, but I don't know how to use it in this problem optimally. I've tried finding "solutions" for $x^2 - x + q$ and representing it as $(x-x_1)(x-x_2)$ where $x_1, x_2$ are solutions to this equation, and the only thing left is to check   if $P(x_1) = 0$ and $P(x_2) = 0$, but I'm not sure if it's the most optimal (or even a correct) way to solve this problem.

We can write
$$6x^4 - 7x^3 + px^2 + 3x + 2=(ax^2+bx+c)(x^2-x+q)$$
Comparing $x^4$ coefficients we see that $a=6$. Now comparing $x^3$ coefficients we get $b=-1$:
$$6x^4 - 7x^3 + px^2 + 3x + 2=(6x^2-x+c)(x^2-x+q)$$
Looking at the $x^0$ and $x^1$ coefficients we have $cq=2$ and $q+c=-3$. By Viète's relations $c,q$ are the roots of $x^2+3x+2$, or $\{c,q\}=\{-1,-2\}$. If $c=-1$ then $p=c+1+6q=-12$; if $c=-2$ then $p=-7$. Hence the possible pairs $(p,q)$ are $(-12,-2)$ and $(-7,-1)$.
