In this situation, one may apply any of a few well known facts.
For example, in the diagram three points F, G, H located on the circle form another right triangle with the altitude FK of length a.
The theorem is of fundamental importance in the Euclidean Geometry where it serves as a basis for the definition of distance between two points.
Therefore, as CB is to BD, so is the figure on CB to the similar and similarly described figure on BA. I hope that a Java applet will help you get to the bottom of this remarkable proof.
For the same reason also, as BC is to CD, so is the figure on BC to that on CA; so that, in addition, as BC is to BD, DC, so is the figure on BC to the similar and similarly described figures on BA, AC. Note that the statement actually proven is much more general than the theorem as it's generally known.
(II.5) which is a recommended reading to students and teachers of Mathematics.
In right-angled triangles the figure on the side subtending the right angle is equal to the similar and similarly described figures on the sides containing the right angle.