A fence 8 ft tall runs parallel to a tall building at a distance of 4 ft from the building.

What is the length of the shortest ladder that will reach from the ground over the fence to the wall of the building?

I know it involves similar triangles... BUT I DON'T GET IT ;____;