The amount of material that the carton holds is the volume of the carton. In this case, it holds 45 smaller boxes with s=6 cm.
Thus the volume of the carton = volume of 45 smaller boxes =45× volume of a single small box.
Volume of one small gift box =s×s×s=6×6×6=216 cm3
∴ Volume of the carton =45×216=9720cm3
Also, length of the carton l=20 cm and breadth of the carton b=15 cm
∴ Volume of the carton =l×b×h=20×15×h
We previously calculated the volume to be 9720 cm3
⟹20×15×h=9720
⟹h=972020×15
⟹h=9720300
⟹h=32.4 cm