Let x be the length of a side of the square. Now, when you form a box, the sides of the base will be (30-2x) and (42-2x) and the height will be x.
You can now determine the volume in terms of x (length x width x height)
You can find dV/dx and set it to 0 to find critical points.
Plug in solution to V expression to find max V. Look for sign change from + to - in dV/dx for max.