Hello, Arsh,
Let x = width and L = length,
The perimeter is P = 2x + 2L and is equal to 158 yards, so we have 2x + 2L = 158
We know that "The length measures 6 yards longer than the width"
We can write that as L = x + 6
Substitute this into the first equation: 2x + 2*(x+6) = 158
2x+2x+12 = 158
4x = 146
x = 36.5 yards
Then L = 42.5 yards
2*36.5 + 2*42.5 = 158 yards