if an object is thrown upwards and then it will return back into our hand then we can say for the complete motion the displacement of the object must be zero
so here we will have
[tex]\Delta y = vt + \frac{1}{2}at^2[/tex]
here we know that
[tex]0 = vt - \frac{1}{2}gt^2[/tex]
[tex]t = \frac{2v}{g}[/tex]
now we will have this time t = 3 s on the surface of earth
again same experiment is performed on surface of moon with same initial speed
so the time on the surface of moon will be
[tex]t_{moon} = \frac{2v}{g/6}[/tex]
so here we have
[tex]t_{moon} = 6\frac{2v}{g} = 6(3) =18 s[/tex]
so it will take 18 s on moon