Suppose v be the velocity attained by the body after time t1.Then v = u - gt1 ...(i)
Let the body reaches the same point at time t2. Now velocity will be downward with same magnitude v, then
-v = u - gt2 ...(ii)
(i) - (ii) ⇒ 2v = g(t2−t1)
or t2−t1=2vg=2g(u−gt1)=2(ug−t1)