I saw the image that should accompany this problem.
It is a rectangular prism and the base has a right triangle with a measure of the following: long leg = 18cm ; short leg = 16cm
We need to look for the hypotenuse because it serves as the long leg of the right triangle where AG is the hypotenuse.
base triangle
a² + b² = c²
(16cm)² + (18cm)² = c²
256cm² + 324cm² = c²
580 cm² = c²
√580cm² = √c²
24 cm = c
2nd triangle: long leg = 24cm ; short leg = 16cm
(24cm)² + (16cm)² = c²
576 cm² + 256 cm² = c²
832 cm² = c²
√832 cm² = √c²
28.8 cm = c
the length of stack AG is 28.8 cm.