Suppose one side of the rect is x, the other side is (160-2x)/2=80-x (taking account of 10 feet of the door).. The area is x(80-x) = 80x - x^2 = 1600 - (1600-80x+x^2) = 1600 - (x-40)^2. So maximum area is reached when x is 40. The dim is 40x40.

http://www.mathpotd.org