One hallway which is 4 feet wide meets another hallway which is 8 feet wide in a right angle (see picture). What is the length of the longest ladder which can be carried horizontally around the corner? (Hint: We need to minimize the length of the ladder so it just fits as shown in the picture. Express the length in terms of the angle θ shown.)

I couldn't copy the picture properly. Sorry for that.