You know that each square has a side of length x. So two of those are taken from each side of the cardboard, right? Thus when the side pieces are folded up the remaining base is a square with sides of length 24 - 2x.

I'll leave it to you to figure out the height of the box and the volume.

-Dan