The cross sectional area is $wh$ where $w$ is the width and $h$ is the height. The constraint is $2h+w = 24$. A simple way to do this is to note that $w = 24-2h$. Substitute this into the equation for the area, giving $24h-2h^2$.
To find the maximum area, differentiate the area expression and look for zeros, giving $24-4h=0$. This gives $h=6$, substituting this into the expression for $w$ gives $w=12$.
Alternatively, you could notice that you can write $24h-2h^2 = 72-2(h-6)^2$, from which is is obvious that setting $h=6$ maximizes the expression. I used 'completing the square' to get this alternative expression.
To answer the question, $6m$ ($=h$) must be turned up on either side.