Hello dear
both the questions are based on law of conservation of energy
(48)
here if we compress the spring then due to this compression energy will be stored in the form of potential energy
so aplly the formula and when we will release the spring this whole energy will be transfered to the block in the form of their kinetic energy
so
1/2 k x2 =1/2 m v2
put all the value you will get
v=
now when block will leave the surface its vertical component of velocity will be zero and it will travel the 2m vertical distance so time taken to get the ground will be
t=root(2h/g)
here put the value you will get
t=
now for horizontal of motion
horizontal distance covered by block in this time
=v * t
solve you will get 1m
means it will travel 1m horizontal distance
Cheers............