Volume for a square pyramid uses the formula V = a^2 x h/3
Volume for the first pyramid = 15^2 x 18/3 = 225 x 6 = 1350 cubic inches.
The second pyramid has the same volume, so we can use the volume from the first one to solve for the side length:
Second pyramid: 1350 = a^2 x 54/3
1350 = a^2 x 18
a^2 = 1350 / 18
a^2 = 75
a = √75 = 8.66 inches