Since the tall building is 35 feet tall and the shorter building is 25 feet tall, then the difference between the roof of the shorter building to the roof of the taller building is:
35 - 25 =10 feet, which is the opposite side of a right-angle triangle.
Since they are 20 feet apart, that is the adjacent side of the triangle. Then by Pythagoras's theorem we have: Ladder(hypotenuse)^2 =10^2 + 20^2, so the ladder will be:
L^2 =100 + 400=500
L =sqrt(500)=22.36 feet - Length of the ladder.