x=(√(p+q)+ √(p-q))^2/((p+q)-(p-q))
= (p+q)+(p-q)+2√((p+q)*(p-q))/2q
then we have,
2p+ 2√((p+q)*(p-q)) = 2qx
p+ √((p^2-q^2))=qx
√((p^2-q^2)) = qx-p, squaring both sides to get:
(p^2-q^2) =(qx-p)^2
p^2-q^2 =q^2x^2+p^2-2pqx
q^2*x^2+ q^2 -2pqx =0 dividing by q throughout, we get:
q*x^2 -2px +q = 0.
Good luck.