Let's call the repeated side of the barn [tex]x[/tex]. Then the remaining fence for the other side is [tex]200-2x[/tex] so the area is
[tex]A = x(200-2x) = -2x^2+200x = -2(x^2-100x)=-2(x^2-100x+2500)- -2(2500) = -2(x-50)^2+5000[/tex]
That clearly has a maximum at x=50, so 50 by 100 for the maximal area.