Explanation:
Pythagoras
c² = a² + b²
with c being the Hypotenuse (the side opposite of the right angle), which is in our case here exactly the ladder itself.
ladder² = 26.3² + 8.4² = 691.69 + 70.56 = 762.25
ladder = 27.60887538... ft
do you need to round the result ? like round to up to the next whole number ? then the answer would be : the ladder needs to be 28 ft long.