There are 2 ladders, one is 25 ft long the other is 20 ft long, they are crossing eachther in an alley between two buildings, find the distance between the two buildings. The point where the ladders intersect to the ground is 10 ft.

I would let the width of the alley be x, where $\displaystyle 0<x$. Drop a vertical line down from the point where the ladders meet to the ground. Let the horizontal distance from the left wall to the vertical line be $\displaystyle x_1$ and the horizontal distance from the vertical line to the right wall be $\displaystyle x_2$, hence:

$\displaystyle x_1+x_2=x$

Now, by similarity (and the Pythagorean theorem), we find:

$\displaystyle x_1=\frac{10x}{\sqrt{20^2-x^2}}$

$\displaystyle x_2=\frac{10x}{\sqrt{25^2-x^2}}$

Now solve for x.