To find height $ h $ use formula:
$$ V = \dfrac{ r ^{ 2 } \cdot h \cdot \pi}{ 3 } $$After substituting $ V = 628 $ and $ r = 5 $ we have:
$$ 628 = \dfrac{ 5 ^{ 2 } \cdot h \cdot \pi}{ 3 } $$$$ 628 \cdot 3 = 5 ^{ 2 } \cdot h \cdot \pi $$$$ 1884 = 25 \cdot h \cdot \pi $$$$ h = \dfrac{ 1884 }{ 25 \, \pi} $$$$ h = 23.9878 $$