Source: Regional Math Olympiad of BD
Let $\triangle BCD$ be a right angled triangle where $\angle BCD$ = 90$^\circ$. $FG$ is perpendicular to $BD$ from any point $F$ on $CD$. Line $BF$ intersects the circumcircle of $BCD$ at $E$. $EG$ and $CD$ intersects at $H$. $CF = 5$, $FH = 3$ then what is value of $HD$?
Here is a liklier figure of the contextual problem:
Here I noticed that the length of $FH$ is dependant on the length of $BC$. But I couldn't relate the $FH$ with $BC$ by any equation I have tried with. It was too hard for me to solve. So, which method should I use or in which way should I proceed?
I'll be highly gladful if it is slightly edited for better understanding.

Let $x= HD$. Since $$\angle FED = \angle FGD = 90^{\circ}$$ the quadrilateral $DEFG$ is cyclic. So $$\angle FGE = \angle FDE = \angle CDE = \angle CBE = \angle CGF$$
and thus $FG$ is (inner) angle bisector for $\angle CGH$ and since $BD\bot FG$ the $BD$ is (outer) angle bisector for $\angle CGH$. By the angle bisector theorem we have:
$$ {CF\over FH} = {CD\over DH} \implies {5\over 3} = {8+x\over x}$$
So $x= 12$.