You can use what is called geometric mean to solve this.
The hypotenuse of this triangle is split into two sections. One section corresponds to/equal to the altitude which is our "X", which corresponds to/equal to the second section.
You find "X" by using geometric mean and the proportion: