Farmer Jill needs a new pen for her pet billy goats. She would like the pen to be rectangular and have an area of 30 square feet. Unfortunately for Farmer Jill, as the sun rises, the billy goats have developed the habit of running full speed at the sun; knocking the East side of the pen over. So, Farmer Jill has decided to make the East side of the pen out of stronger fencing that costs $40/ft while the other three sides will be made out of fencing that costs $15/ft. Since caring for the billy goats already requires a lot of time and money, Farmer Jill wants to spend as little as possible on this new pen. So she needs you to answer the following two questions:

What dimensions will minimize the cost of the pen?
How much will it cost her to build that pen?

I have so far that xy=30
40x+15y=30, am i going in the right direction?

1 answer

You didn't define your x and y, but I will assume that they represent length and width.
So your first equation of xy = 30 is correct

Your second equation makes no sense

I will let x be one of the sides costing $55/ft

From the data, I get
Cost = 40x + 15(x+2y)
= 40x + 15x + 30y
but from xy=30 ----> y = 30/x

cost = 55x + 30(30/x) = 55x + 900/x
d(cost)/dx = 55 - 900/x^2
= 0 for a min of cost
55 = 900/x^2
x^2 = 900/55
x = 30/√55 = appr 4.05 ft
y = 30/x = appr 7.42 ft

check: (4.05)(7.42) = 30.051 , close enough
cost = 50(4.05) + 900/4.05) = $424.72

take a value of x slightly larger and smaller than 4.04
let x = 4
cost = 55(4) + 900/4 = $445 , which is more than my min
let x = 4.10
cost = 55(4.1) + 900/4.1 = $ 445.01 , again more than my min

So you have a pen about 4 ft by 7 ft to hold more than one billy goats?
Looks like in an effort to make the question sound "cute", the author of this question took no time to see if the resulting answer is even reasonable.
cost =