There is a long fence along the border of 2 mens property. 1 man is using the existing fence to make a cattle pen. He has 500 ft of fencing. Suppose the pen extends x ft away from the existing fence along the border. Find an expression for the area in terms of x.

The area that he encloses for the pen is x * L, where L is the length of the existing fence that he uses. The fence material that he has can cover a length

2 x + L = 500
The area enclosed is therefore
A = x L = x*(500 - 2x) = 500 x -1000 x^2

Are you supposed to choose x to maximize area? If so, set dA/dx = 0 and solve for x.