To find height $ h $ use Pythagorean Theorem:
$$ h^2 + \frac{ a^2 }{ 4 } = s^2 $$After substituting $a = 8\, \text{cm}$ and $s = 5\, \text{cm}$ we have:
$$ h ^ {\,2} + \frac{ \left( 8\, \text{cm} \right)^{2} }{ 4 } = \left( 5\, \text{cm} \right)^{2} $$ $$ h ^ {\,2} + \frac{ 64\, \text{cm}^2 }{ 4 } = \left( 5\, \text{cm} \right)^{2} $$ $$ h ^ {\,2} + 16\, \text{cm}^2 = \left( 5\, \text{cm} \right)^{2} $$ $$ h ^ {\,2} = 25\, \text{cm}^2 - 16\, \text{cm}^2 $$ $$ h ^ {\,2} = 9\, \text{cm}^2 $$ $$ h = \sqrt{ 9\, \text{cm}^2 } $$$$ h = 3\, \text{cm} $$