Hello!
Suppose you cut squares have the side lengths x then we have
length of base box=20-2x
width of base box=30-2x
height of box=x
volume of the box
V=x(20-2x)(30-2x)
V=600x-100x^2+4x^3
then
dV/dx=600-200x+12x^2
set that to zero
600-200x+12x^2=0
apply quadratic formula
x=approx12.97 or 3.92
since you want in whole numbers so x=13 or x=4
so if x=13 then V= -312 but negative number doesn't make a sense so we ignore that
if x=4 then v=1056 this is the greatest volume
the dimensions are
length of a box base=12
width of a box base=22
height of box =4
did u get it ?
Hope I Helped! Have A Wonderful Day! :)