Help with geometry problem I have the following problem that has been annoying me for ages, I can get so close to the answer. I'll outline my working so far below.

In the diagram, $|AB|=|OF|=1$, whereas $|AO|=p$ and $|OG|=q$. You may assume that all lines are straight. $\angle OAB, \angle OGH, \angle COG$ are right angles and $|AB|=|CO|$.



Well from the outlook we know $|AB|=|OF|=1$ and $|AO|=p$ and $|OG|=q$. Now we can show by Pythagoras that $|OB|=\sqrt{p^2+1}$. Also $|FG|=q-1$ and since $\Delta COF\sim\Delta HGF$ by $AA$ rule with have that $|GH|=q-1$. Now by Pythagoras on $\Delta OGH$ we get $|OH|=\sqrt{q^2+(q-1)^2}$. Now we can create the triangle $\Delta BIH$ where $I$ the vertice that is horizontal to $H$ and vertical to $B$.
Sorry for the awful paint picture :). And now when I try to use Pythagoras on this triangle I eventually end up with $$(p+q)^2=pq(2q+2p-pq)$$ This apparently can be reduced to the correct answer according to Wolfram Alpha but I can't seem to see the way to do it. I feel like it's something really obvious but I can't see it. Any ideas? Here's the original image.

$$\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}=...$$
