Applied max and min problem

Hi, I'm having a bit of trouble getting this one problem started:

Quote:

Painters are painting the second floor exterior wall of a building that adjoins a busy sidewalk. A corridor 2 m wide and 3 m high is built to protect pedestrians. What is the length of the shortest ladder that will reach from the ground over the corridor to the wall of the building?

I have tried using the pythagorean theorem as well as similar triangles but it doesn't seem to be working out. Any help would be appreciated.