Let the side of the square to be cut off be x cm. Then, the height of the box is x, the length is 45 − 2x, and the breadth is 24 − 2x.
Therefore, the volume V(x) of the box is given by,

It is not possible to cut off a square of side 18 cm from each corner of the rectangular sheet. Thus, x cannot be equal to 18.
∴x = 5

By second derivative test, x = 5 is the point of maxima.
Hence, the side of the square to be cut off to make the volume of the box maximum possible is 5 cm.