If $x^2+kx+1$ is a factor of $px^5+qx^2+r$ prove that $(p^2-r^2)(p^2-r^2+qr)=q^2p^2$ if $x^2+kx+1$ is a factor of $px^5+qx^2+r$ prove that $(p^2-r^2)(p^2-r^2+qr)=q^2p^2$
My try
Since this is a factor I tired finding A, B, C & D such that,
$(x^2+kx+1)(Ax^3+Bx^2+cx+D)$ =$px^5+qx^2+r$
if I can find k in terms of p, q & r I can try to get the given condition, But when I tried this equating coefficients, I ended up with quadratic expression for k? Is there a better way to approach this question? Please Help! thanks

$\mathrm{px^5+qx^2+r\\if~x^2+kx+1~is ~a ~factor\\ [x^2+kx+1][Ax^3+Bx^2+Cx+D]\equiv px^5+qx^2+r\\
by~expansion:\\x^5:Ax^5=px^5 ~\underbrace{A=p} \cdots(i) \\x^4: Bx^4+kAx^4=0,~\underbrace{B=-kA} \cdots(ii) \\x^3: Cx^3+kBx^3+Ax^3=0; \underbrace{C+kB+A=0} \cdots(iii) \\x^2:~Dx^2+kCx^2+Bx^2=qx^2;~\underbrace{D+kC+B=q} \cdots(iv)\\x:kDx+Cx=0;\underbrace{kD+C=0} \cdots(v)\\\underbrace{D=r} \cdots(vi) \\A=p, B=-kp, C=-kD, D=r~~\Biggr |C=-kr ~considering ~eqn(iii)~and~eqn(iv)~respectively \\kB=-A-C\cdots*;~kC=q+D-B\cdots**\\divide~ eqn(*)~ by~(**)\\\frac{kB} {kC} =\frac{-A-C} {q-D-B};~~\frac{B} {C} =\frac{A+C} {D+B-q};\frac{-kp} {-kr} =\frac{p-kr} {r-kp-q} ; \frac{p} {r}=\frac{p-kr} {r-kp-q}\\p(r-kp-q) =r(p-kr) \\pr-kp^2-pq=rp-kr^2\Biggr|k=\frac{pr-rp-pq}{p^2-r^2}\\(x^2+kx+1)(Ax^3+Bx^2+Cx+D)=\Biggr[x^2+\frac{pr-rp-rq}{p^2-r^2}x+1\Biggr] \cdots\\
} $
$substituting~the~value~of~k~back$
$\\\Biggr\{x^2+\frac{pq}{r^2-p^2}x+1\Biggr\}\Biggr\{px^3-\frac{p^2q}{r^2-p^2}x^2-\frac{pqr}{r^2-p^2}x+r\Biggr\} \equiv{px^5+qx^2+r} \\consider~x^3:\\\frac{-pqr}{r^2-p^2}+\frac{pq}{r^2-p^2}\biggr(\frac{-p^2q}{r^2-p^2}\biggr)+p=0\\-pqr+\frac{pq(-p^2q)}{r^2-p^2}
+p(r^2-p^2)=0$
$-p^2q^2+(r^2-p^2)^2=qr(r^2-p^2)\\(r^2-p^2)^2 -qr (r^2-p^2)=p^2 q^2  \\ (r^2-p^2)(r^2-p^2-qr)= p^2q^2 \\\underbrace{p^2q^2=(p^2-r^2)(p^2-r^2+qr)} $
