Bob wants to create two pens. One pen if for a garden and it needs a heavy duty fence to keep out the critters. This heavy duty fence costs $15 per foot. The dog pen shares a side with the garden and has a lighter weight fence on the other three sides that costs $5 per foot. If each pen is to have an area of 504, find the values of x and y that would minimize the total cost of the fencing.