I came across this formula in my textbook stating that when a body is projected vertically upwards and the time corresponding to height H while ascending and descending are t1 and t2 respectively, when the velocity of projection is (g(t1+t2))/2 where g is acceleration due to gravity.

Can anyone please help me in deriving this formula? 
I know that in case of vertical motion upwards the initial velocity will be gt1. But I don't know how to proceed further.
Please help.