You want to maximize area = length * width with the condition that the amount of fencing = 2 * length + 2 * width - 8 - 20 = 42, so length + width = 35 and width = 35 - length. If you substitute that into the equation for area and set the derivative with respect to length equal to zero, you get the result length = width = 17.5. Unfortunately, that solution is not valid because the equation for the amount of fencing is invalid for this width.
If the width is 20 or less, the amount of fencing is independent of w, so we should make w the maximum value of 20, which makes the length 15, and your solution is correct.
If you're still having trouble, please post again in this thread.