hey hey kirtana and puneet ,
the solution that kirtana has provided is alright no problems with that , the only thing that she has written incorrectly is that " relative velocity in vertical direction " ....because its not the relative velocity in vertical direction , its actually just relative velocity and its direction changes every second . so we write the equation as
integral of ( relative velocity between two) = relative displacement between two
which is the fundamental equation of kinematics ...............
and the other equation is quite straightforward.............