To find height $ h $ use formula:
$$ V = \dfrac{ a ^{ 2 } \cdot h }{ 3 } $$After substituting $V = 15\, \text{cm}$ and $a = 3\, \text{cm}$ we have:
$$ 15\, \text{cm} = \dfrac{ 3\, \text{cm} ^{ 2 } \cdot h }{ 3 } $$$$ 15\, \text{cm} \cdot 3 = 3\, \text{cm} ^{ 2 } \cdot h $$$$ 45\, \text{cm} = 9\, \text{cm}^2 \cdot h $$$$ h = \dfrac{ 45\, \text{cm} }{ 9\, \text{cm}^2 } $$$$ h = 5\, \text{cm}^-1 $$