Firstly, we need to understand the formula of the volume of a pyramid:

The volume of the cube:

We can then set up a equation:
Let the height be x feet.
64 = 1/3 × 16 × y
y = 64 × 3 × 1/16
y = 12 feet
Therefore,the height of pyramid is 12 feet.
Hope it helps!