Optimization problem, fencing

11. A farmer wants to fence an area of 1.5 million square feet in a rectangular field and then divide it in half with a fence parallel to one sides of the rectangle. how can he do this so as to minimize the cost of the fence.

i got this problem completely wrong, but here's what I did,

area = 1500000

area = xy = 1,500,000

length of fence = perimeter = 3x+4y

then

xy=1,500,000

y=\frac{1,500,000}{x}

3x+4\frac{1,500,000}{x}

f'(x) = 3+\frac{-6,000,000}{x^2}

= \frac{3x^2-6,000,000}{x^2}

= \frac{3(x^2-2,000,000)}{x^2}

x=1414

then... i got completely lost.