Here since we know that

this equation shows that there is no air resistance
so in that case the time taken by the object during it's accent must be equal to the time taken by object during decent
so if we are given that during the upward motion object passes the two points A and B then its change in speed is given as

similarly if we take its downward motion then in that case
it will take same time to move through the two points
so we will have

so here we will have
