I'm unsure if I got the following right on a test I just took:
A farmer wants to build a rectangular fence using both wood and metal and wants adjacent sides to be of the same material. Metal costs $5$ dollars per square foot and wood costs $3$ dollars per square foot. What is the maximum area of the enclosure with a budget of $240$ dollars?
I got $y=15$ and $x=12$.
I would ask questions to clarify, but since I'm too super-noob to do that, I'll just answer the question as I read it.
If every two adjacent sides must be the same material, then the whole fence must be the same material. But, that is moot, because the wood is cheaper-- so he should use all wood to maximize the fence area.
So: $$ {$240} * {{1 ft^2} \over {$3}} = {80 ft^2} $$
But, there are a few odd things about the question.
By "the area of the enclosure" are you talking about the fence area, or the area of the space enclosed by the fence? I'm going to assume you mean the area enclosed by the fence.
What is meant by "adjacent sides"? Is that two sides should be metal and the other two should be wood? I'll assume that.
When you talk about metal and wood being priced in square feet, then the farmer can make his fence really short and have lots of area. So, I'll assume that the materials are priced in feet and the height of the fence is constant.
So, with that and x and y being the lengths of the sides of the fence, m and w the price of the materials, C for the budget cost, and A for the fence area, the problem becomes:
$$ C = (m+w)*(x+y) $$ $$ A = x*y $$
Combine equations with x being the main parameter: $$ A={C \over (m+w)}x - x^2 $$
Find the extremes by letting the derivative of A be zero: $$ A'=0={C \over m+w} - 2x $$
Then solve for x and y with that condition true: $$ x = {C \over 2(m+w)} = 15 $$ $$ A = 225 $$ $$ y = 15 $$ $$ C = (w+m)(x+y) = 240 $$
This is at variance with the other answers, so I hope I'm not totally botching this.