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.