To find slant height $ s $ use Pythagorean Theorem:
$$ h^2 + \frac{ a^2 }{ 4 } = s^2 $$After substituting $h = 12.35\, \text{cm}$ and $a = 40\, \text{cm}$ we have:
$$ \left( 12.35\, \text{cm} \right)^{2} + \frac{ \left( 40\, \text{cm} \right)^{2} }{ 4 }= s^2 $$ $$ 152.5225\, \text{cm}^2 + \frac{ 1600\, \text{cm}^2 }{ 4 }= s^2 $$ $$ 152.5225\, \text{cm}^2 + 400\, \text{cm}^2 = s^2 $$ $$ s^2 = 552.5225\, \text{cm}^2 $$ $$ s = \sqrt{ 552.5225\, \text{cm}^2 } $$$$ s = 23.5058\, \text{cm} $$