We shall use Pythagorean Theorem.
Which is
a² + b² = c²
Where
c is the hypotenuse
a is the altitude
b is the base
In the figure
c = 500 m
b = 400 m
Substituting the values
We get
a² + 400² = 500²
a² + 160000 = 250000
Subtracting 160000 from both sides we get
a² = 250000 - 160000
a² = 90000
Taking square root on both sides, we get
a = 300 m
Hence the the length of the altitude is 300 m.