Show that among all rectangles with an 8-m perimeter possible, the one with the largest area is a square.
That's the best approach to solving optimization problems. Draw a diagram.
If you are still lost on how to solve it, I'll help you. But see if you can proceed from here.