the formula for the volume of a pyramid is:
V = (l * w * h) / 3
knowing the formula we can replace the letters with the values we know:
v = 162
h = 6
since they told us the pyramid is square, we know that both L and W would be the same, so now we CAN SAY L *W = L^2 and solve for that:
162 = (l^2 * 6) / 3
multiply both sides by 3
486 = l^2 * 6
divide both sides by 6:
81 = l^2
l = sqrt(81)
l = 9 feet