It'd help if you could sketch this situation. Note that the area of a rectangle is equal to the product of its width and length: A = L W.
Consider the perimeter of this rectangular area. It's P = 2 L + 2 W. Note that P = 40 meters in this problem.
Thus, if we choose to use W as our independent variable, then P = 40 meters = 2 L + 2 W. Let's express L in terms of W. Divide both sides of the following equation by 2: 40 = 2 L + 2 W. We get 20 = L + W. Thus, L = 20 - w.
Then the area of the rectangle is A = ( 20 - W)*W.
Multiply this out. Your result will be a quadratic equation. Graph this quadratic equation (in other words, graph the function that represents the area of the rectangle). For which W value is the area at its maximum?
Alternatively, find the vertex of this graph: remember that the x- (or W-) coordinate of the vertex is given by
W = -b/(2a), where a is the coefficient of W^2 an b is the coefficient of W in your quadratic equation.
Finally, substitute this value of W into your quadratic equation, to calculate the maximum area.