Step 1:

Side of the square $\rightarrow (45-2x)(24-2x)x$

Volume of the box=$l\times b\times h$

$V=(45-2x)(24-2x).x$

$\;\;=2x(12-x)(45-2x)$

$\;\;=2x(540-45x-24x+2x^2)$

$\;\;=2x[2x^2-69x+540]$

$\;\;=2(2x^3-69x^2+540x)$

Differentiating with respect to x we get

$\large\frac{dV}{dx}$$=2(6x^2-138x+540)$

$\quad=2\times 6(x^2-23x+90)$

$\quad=12(x^2-23x+90)$

Step 2:

For maxima & minima

$\large\frac{dV}{dx}$$=0$

$12(x^2-23x+90)=0$

$x^2-23x+90=0$

$x^2-5x-18x+90=0$

$x(x-5)-18(x-5)=0$

$(x-18)(x-5)=0$

$x=18,5$

Step 3:

But $x$ cannot be greater than 12

$\Rightarrow x=5$

$\large\frac{d^2V}{dx^2}$$=12(2x-23)$------(1)

Substitute the value of $x=5$ in (1)

$\large\frac{d^2V}{dx^2}=$$12(2\times 5-23)$

$\qquad=12(10-23)$

$\qquad=12(-13)$

$\Rightarrow$ -ve

$\therefore V$ is maximum at $x=5$

(i.e) Square of side 5 cm is cut off from each corner.