so you can make 2 equations form this

180 000 = x*y for your area

2x+y=P for your perimetre

since there is 2 variables, use the equation with an answer to solve fora variable, lets solve for x

x=180000/y

plug this into your P equation

2x+(180000/x)=P

find the derivative

2+(-180000/x^2)=P'

Equate to 0

-2x^2=-180000

x^2=90000

x=300

Plug into original equation to solve for y

180000=(300)*y

y=600

So your fence should be 300x600