I would let the width of the alley bex, where . 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 and the horizontal distance from the vertical line to the right wall be , hence:

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

Now solve forx.