Let the ball be projected upwards with an initial velocity vo.
For the upward journey,
Initial velocity, u=vo
Final velocity, v=0
Acceleration, a=g (in downward direction)
From the first equation of motion, v=u+at
⇒0=vo−gtup
⇒tup=vog
Maximum height reached, h=vo22g
For the downward journey,
Initial velocity, u=0
Distance moved, h=vo22g
From the second equation of motion, h=ut+12gt2
⇒vo22g=12gtdown2
tdown=vog
Hence, tup=tdown