After removing the square corners, you're left with a cross shape that folds into a cuboid with base dimensions

by

, and height

. The volume of this box is

.
Writing this as a function, we can take the derivative to find the critical points and determine the value of

that maximizes the volume:


when

or

. But

, the cut we try to make isn't a cut; the piece of cardboard stays flat and unchanged. So the volume is maximized when

(you can verify that the derivative behaves accordingly; that is,

for

and

for

).
The largest volume of the box is then

cubic inches.