Question 1032284
.
<pre>
Let x = how far up the building the ladder reaches (vertical leg).
Then the other leg is (x+8).

The Pythagorean equation is 

{{{x^2 + (x+8)^2}}} = {{{40^2}}}.

{{{2x^2 + 16x + 64}}} = {{{1600}}},

{{{x^2 + 8x - 768}}} = {{{0}}},

(x-24)*(x+32) = 0,

The only positive root is x = 24.

<U>Check</U>. {{{24^2 + 32^2}}} = {{{1600}}}.
</pre>