check the picture below.
[tex]\bf \stackrel{area}{A}=length\cdot width\implies A(w)=(1000-2w)w
\\\\\\
\boxed{A(w)=1000w-2w^2}
\\\\\\
\cfrac{dA}{dw}=1000-4w\implies 0=1000-4w\implies 4w=1000
\\\\\\
w=\cfrac{1000}{4}\implies \boxed{w=\stackrel{width}{250}}
\\\\\\\
[1000-2(250)]\implies 1000-500\implies \boxed{l=\stackrel{length}{500}}[/tex]
and if you run a first-derivative test on say x = 249 and x = 251, you'll notice the slope is positive and negative respectively, meaning, is a maximum.