Let L = length of cardboard and W = width
If size 1 squares are cut out, then volume of box = (L-2)(W-2)(1)
If size 2 squares are cut out, then volume of box = (L-4)(W-4)(2)
So, LW - 2L - 2W +4 = 2(LW - 4L - 4W + 16)
LW - 2L - 2W + 4 = 2LW - 8L - 8W + 32
Therefore, LW = 6L + 6W - 28
If size 3 squares are cut out, then volume = (L-6)(W-6)(3)
= 3(LW - 6L - 6W +36)
= 3(6L + 6W - 28 - 6L - 6W + 36)
= 3(8) = 24