You can put this solution on YOUR website!
Length and width assigning not really important except to be consistant with how assigned and used.
Taking either dimension as L for "length" and then W for width,
The whole rectangle is as
You could then choose fencing costs of 17*L and 2*8W, so this combined cost for those THREE sides would be
The system based on that is:
Solving the perimeter equation for W and substituting into the cost equation gives (try doing this on your own)
Using this in the formula used for W gives