Because the width is 8m, it is enough to take the width as the side length of the square.
(2) Two situations can be considered when making the rest of the henhouse. First of all, 12m long land has one side against the wall, that is, a fence of 4+8+4 = 16m needs to be prepared.
In the second case, 8m land is against the wall and (4+8) × 2 = 24m fence.