So basically the ladder is creating a right triangle with the ground and the wall. Ladder is the hypotenuse (h), building = b, ground = g
b = h - 22 ft
g = 1010 ft
use Pythagorean Theorem to determine the length of h:
[tex] {c}^{2} = {a}^{2} + {b}^{2} \\ {h}^{2} = {(h - 22)}^{2} + {1010}^{2} \\ {h}^{2} = {h}^{2} - 44h + 484 + 1020100[/tex]
The h^2 terms cancel out to = 0
[tex]0 = - 44h + 484 + 1020100 \\ 44h = 1020584 \\ 44h \div 44 = 1020584 \div 44 \\ h = 23195.1 \: feet[/tex]