A farmer needs to build corrals. He will create two adjacent corrals and one side will be the barn. The farmer decide to use 400ft of fencing.
To maximize the amount of space that can be enclosed by 400 ft of fencing, the two corrals should share one side so that only one stretch of fencing is needed between them, and both should have the barn as a side. See picture, red is the side of the barn, black is the fencing.
Since there are 5 fences and 400 ft of fencing, that evenly divides to 80 ft. per stretch. If each side of a corral is 80 ft, that yields an area of 6400 sq. ft. per corral for a combined area of 12800 sq. ft.
Each corral should be 80 ft by 80 ft.