if you notice the picture below, the amount of fencing, or perimeter, that will be used will be 3w + 2l
now [tex]\bf \begin{cases}
A=l\cdot w\\\\\
A=3000000\\
----------\\
3000000=l\cdot w\\\\
\frac{3000000}{w}=l
\end{cases}\qquad thus
\\\\\\
P=3w+2l\implies P=3w+2\left( \cfrac{3000000}{w} \right)\implies P=3w+\cfrac{6000000}{w}
\\\\\\
P=3w+6000000w^{-1}\\\\
-----------------------------\\\\
now\qquad \cfrac{dP}{dw}=3-\cfrac{6000000}{w^2}\implies \cfrac{dP}{dw}=\cfrac{3w^2-6000000}{w^2}
\\\\\\
\textit{so the critical points are at }
\begin{cases}
0=w^2\\\\
0=\frac{3w^2-6000000}{w^2}
\end{cases}[/tex]
solve for "w", to see what critical points you get, and then run a first-derivative test on them, for the minimum
notice the [tex]0=w^2\implies 0=w[/tex] so. you can pretty much skip that one, though is a valid critical point, the width can't clearly be 0
so.. check the critical points on the other