We can Notice from the Diagram that : The Length of the Ladder and The Length of the Base of the Ladder from the Base of the Building and The Height of the Building form a Right Angled Triangle
Where : Length of the Ladder is the Hypotenuse
Now, Based on the Pythagorean Theorem :
⇒ (Length of the Ladder)² = 12² + 35²
⇒ (Length of the Ladder)² = 144 + 1225
⇒ (Length of the Ladder)² = 1369
⇒ (Length of the Ladder)² = 37²
⇒ Length of the Ladder = 37 feet
-------------------------------------------------------------
Given : Alex Drives Pennsylvania by Driving 400 Miles South and 300 Miles West
Total Distance he traveled in this way : (400 + 300) = 700 Miles
Now We can Notice that : The Shortest Distance will be, The Hypotenuse of the Right Angled Triangle Formed with Sides as 400 Miles South and 300 Miles West.
Based on Pythagorean Theorem :
⇒ (Shortest Distance)² = 400² + 300²
⇒ (Shortest Distance)² = 1600 + 900
⇒ (Shortest Distance)² = 2500
⇒ (Shortest Distance)² = 500²
⇒ Shortest Distance = 500
Distance Shorter if he Travels in this Way : (700 - 500) = 200 Miles