If $p(x^5) + q(x^2) + r = 0$ has a factor of the form $x^2 + ax + 1 = 0$ prove that $$(p^2 - q^2)(p^2 - r^2 + qr) = (pq)^2$$
So before this question, I had another question where the equation was of the third degree and the factor was of the form $x^2 - 2ax + a^2 = 0$ so I converted the factor to the form of $(x-a)^2$ which mean two of the three roots of the equation are $+a$ and $+a$.
Then comparing the coefficients of the equation and all the roots (assuming the third root to be $p$) I found the value of $p$ and then proved the condition.
In this question, it won't work so I tried to divide the equation with the factor equation and equated the remainder with $0$. But I wasn't able to eliminate $x$ from the remainder equation so never had the chance it to equate with $0$.
Is there some specific method or approach for this type of question or am I making a mistake in my appraoch?
Hint: If $$x^2+ax+1$$ is a factor of $$px^5+q^2+r$$ then must hold $$px^5+qx^2+r=(x^2+ax+1)(Ax^3+Bx^2+Cx+D)$$