Related to velocity of sound

Please help. I can't find any solution of this problem on the internet. Thank you.

A glass falls from the window of a tall building . The sound of broken glass reaches the same level 3 s later. How high is the window? Assume velocity of sound to be 340m/s

The glass is falling at constant gravitational acceleration. From the formula s = vot + ½gt2; vo = 0 and g = 9.81 m/s2. Solving for t:
$t = \sqrt{\dfrac{2h}{g}}$
 

The sound is moving at constant velocity. From the formula s = vt, s = h and v = 340 m/s. Solving for t:
$t = \dfrac{h}{340}$
 

tglass + tsound = 3 seconds
$\sqrt{\dfrac{2h}{g}} + \dfrac{h}{340} = 3$

$h = 40.69 ~ \text{m}$