W ≤ L
WL = 240
c = 5, c' = 12
C( W, L ) = Some function, f, of W and L [ f( W, L ) ]
'Most economical to construct' seems to communicate the lowest cost possible to achieve the fence project.
Strangely, it is when the 2 L walls are at a cost of $5/ft and 1 W wall is at $5/ft and the other is $12/ft.
Because of the postulation of W ≤ L, the sum of the two W walls should be less than the sum of the two L walls.
Thus,
C = 5 ( 2L + W ) + 12 W
C = 10 L + 17 W
W = 240 / L
C = 10 L + 17 ( 240 / L )
C = 10 L + 4080 / L
C' = 0 = 10 - 4080 / L2
After some algebra and equation manipulation,
10 L2 = 4080
∴ L ≈ 20.20 ft
W = 240 / L
∴ W ≈ 11.88 ft
Note: If you attempted the cost the other way, you'd get the same numbers, just on opposite variables and conflict with the given W ≤ L prompt postulation.
I hope this helps! Please message me in the comments if you have any questions, comments, or concerns!