For this type of question, we would make use of Pythagorean theorem to solve for the vertical height the ladder reaches, assuming that the 18 foot ladder represents the hypotenuse as it leans against the wall and the base or the distance from the wall to the ladder is 8 feet we can solve for the height as follows:
A^2 + B^2 = C^2
A^2 = C^2 - B^2
A^2 = (18^2) - (8^2)
A^2 = 324 - 64
A^2 = 260
A = 16.2 or about 16 feet.
This is the height the ladder will reach up on the wall.