Basically, what you have done "wrong" is back-substituting, so that you end up with the trivially correct equation 3/4=3/4 .
You already have a perfectly good expression for the width, w=3(4-L)/4.
With this expression, what is the area of the rectangle?
How can you find the maximum of this area?