the ladder, the wall and the floor form together a triangle rectangle, where the ladder is the hypotenuse of the triangle and the floor and wall are the cathetus. We know from Pythagoreas theorem that the square of the hypotenuse is equal to the sum of the two cathetus squared added, so we can write an equation with the data we have:
hyp^2 = cath1^2 + cath2^2
hyp^2 = wall^2 + floor^2
so we have the hypotenuse value, the floor value and the unknown is the wall height:
(22)^2 = wall^2 + (7)^2
484 = wall^2 + 49
wall^2 = 484 - 49 = 435
wall = √435
wall = 20.9
therefore the ladder touches the wall 20.9 feet above the ground