Let me know if I've got the right answer, but it should go something like this.
So we can call the 2 remaining sides x and 8 - x
Area = x (8 - x) = 8x - x^2
We want to differentiate this in terms of x to find the maximum
dA / dx = 8 - 2x
dA/dx = 0 when x = 4
To prove it is a maximum, we can find the 2nd derivative; that would just be -2 (as this is negative, there is a maximum when x = 4)
So the dimensions would be 4 metres x 4 metres (x and 8 - x, when x = 4)