I really feel like I'm going on the wrong track on this problem:

A rectangular piece of cardboard, $\displaystyle 100 cm$ by $\displaystyle 40 cm$, is going to be used to make a rectangular box with an open top by cutting congruent squares from the corners. Calculate the dimensions for a box with the largest volume.

What I did so far was find height to either $\displaystyle h=\frac{100-y}{2}$ or $\displaystyle h=\frac{40-x}{2}$. Is that correct?

Also, area is $\displaystyle A=xy+2hy+2hx$?

What would I do next?