Help with geometry problem
$$\dfrac{AB}{AO}=\dfrac{GH}{GO}\implies GH=\dfrac q p$$
$$\dfrac{GH}{GF}=\dfrac{OC}{OF}\implies q=p(q-1)\implies p+q=pq\implies p= \dfrac{q}{q-1} $$
$$BH=\sqrt{(AB+GH)^2+AG^2}=\sqrt{(1+\dfrac q p)^2+(p+q)^2}$$
$$=\sqrt{(1+{q-1})^2+(pq)^2}=\sqrt{q^2+(\dfrac{q^2}{q-1})^2}=...$$
You could also solve your equation for $p+q$ using the quadratic formula:
$$(p+q)^2 = pq(2q+2p-pq)\\ (p+q)^2 = pq[2(p+q)-pq] \\ (p+q)^2 - 2pq(p+q) + (pq)^2=0$$
Therefore:
$$p+q = \frac{2pq\pm \sqrt{4(pq)^2- 4(pq)^2 } } {2} =pq$$