Case of t1 the stone was thrown downward.
H=ut1+12gt12--(a)
second case −H=ut2+12gt22 ..(b)
Maximum height with respect to the level H can be calculated by v2=u2−2as=>s=u22g so with height will be H+u22g But H is not given So by subtraction a and b equations
2H=(ut1+12gt12)–(ut2+12gt22)
=u(t1−t2)−(12gt12)−t22
H=u(t1−t2)−12g(t12−t22)2
so the maxium height with respect to groun is =u(t1−t2)−12g(t12−t22)2+u22g