Let the width = w.
The length is "2 feet less than 1/2 the width", so the length is
w/2 - 2
Now we add two lengths and two widths and set it equal to the perimeter.
w/2 - 2 + w/2 - 2 + w + w = 158
3w - 4 = 158
3w = 162
w = 54
The width is 54 ft.
The length is w/2 - 2 = 54/2 - 2 = 27 - 2 = 25.
The length is 25 ft.
Answer: The length is 25 ft and the width is 54 ft.