The small triangle at the top with a base of length s is SIMILAR to the original triangle. Therefore the ratio of the bases is equal to the ratio of their altitudes.

Solve for s:

This shows that s is one-half the harmonice mean of a and h, or, rewriting gives