Let h = the height of the tower that needs to be determined.
Let t be the time of fall.
Then (t - 2) would be the time to reach the top of the 40 meter mark, and let d be the distance fallen till it reaches the 40 m mark.
Using kinematics, we can write:
d=12g(t−2)2
And H=1/2gt2
H also =40+d
Then: H=40+1/2g(t−2)2=1/2gt2
40+5t2−20t+20=5t2
t=3s
(t−2)=1second
In one second an object falls 5 m
Then H=45m