The following is a question for my math class. I just cannot figure it out.

Given is that: h is the altitude that divides the longest side of this right triangle into p and q.
Question: Prove that h² = pq
I really have no idea what to do. Could anyone push me in the right direction?
EDIT: I'm now this far:
For convenience, lets call the opposite side of the big triangle s, and the adjacent of the big triangle r.
There are three similar triangles:
- Triangle shq
- Triangle hpr
- Triangle sr(p+q)
Now, using the pythagoras theorem to determine the hypotenuse(i.e. p+q) of the big triangle sr(p+q)
$(p+q)^2 = s^2 + r^2$
Now filling in s and r:
$(p+q)^2 = h^2 + q^2 + h^2 + p^2$
$(p+q)^2 = h^4 + p^2 + q^2$
$p+q = h^2$
but... $p + q$ isn't $p*q$, right? Where is my mistake?
Note that $\triangle ADC \sim \triangle BDA$. (Why?) This is so since $$\angle{ADC} = \angle{BDA} = 90^{\circ}$$ Further, $$\underbrace{\angle{CAD} = 90^{\circ} - \angle{ACD}}_{\because\text{ }\triangle ADC \text{ is right-angled at }D} = \underbrace{90^{\circ} - \angle{ACB} = \angle{ABC}}_{\because \text{ }\triangle ABC \text{ is right-angled at } A} = \angle{ABD}$$ Hence, we have that $\triangle ADC \sim \triangle BDA$. Hence, the ratio of the corresponding sides must be equal i.e. $$\dfrac{\text{Side opposite to }\angle{ACD}}{\text{Side opposite to }\angle{DAC}} = \dfrac{\text{Side opposite to }\angle{BAD}}{\text{Side opposite to }\angle{DBA}}$$ From this conclude, what you want to.