#### Answer

$x = 20$
$y = 10 \sqrt 5$

#### Work Step by Step

The altitude of a right triangle is the geometric mean of the lengths of the two hypotenuse segments. Let's set up that proportion:
The geometric mean of two numbers can be found using the following proportion:
$\frac{a}{x} = \frac{x}{b}$, where $a$ and $b$ are the lengths of the two hypotenuse segments and $x$ is the length of the altitude.
Let's plug in our numbers:
$\frac{50 - 40}{x} = \frac{y}{40}$
Use the cross products property to get rid of the fractions:
$x^2 = 10 • 40$
Multiply to simplify:
$x^2 = 400$
Take the positive square root to solve for $y$:
$x = 20$
To find $y$, we know that each leg of the triangle is the geometric mean of the hypotenuse and the hypotenuse that is adjacent to that leg:
$\frac{a}{x} = \frac{x}{b}$, where $a$ and $b$ are the length of the hypotenuse and the length of the segment of the hypotenuse closest to the leg, and $x$ is the length of the leg.
$\frac{50}{y} = \frac{y}{50 - 40}$
Use the cross products property to get rid of the fractions:
$y^2 = 50 • 10$
Multiply to simplify:
$y^2 = 500$
Rewrite $500$ as the product of a perfect square and another factor:
$y^2 = 100 • 5$
Take the positive square root of each factor to solve for $y$:
$y = 10 \sqrt 5$