Use Pythagoras’ theorem.
You are given the vertical height (24 feet) and the hypotenuse (slanted height, 30 feet)
Pythagoras’ theorem is a^2 + b^2 = c^2
Where c is the hypotenuse and a and b are the other two sides of a right angle triangle.
So a^2 = c^2 - b^2
a^2 = 30^2 - 24^2
a^2 = 900 - 576
a^2 = 324
(Square root)
a = 18 feet