According to the problem the ball is thrown upward.
After 3 second it will reach at the top most position within =5-3 = 2 sec
Therefore the ball will take 3+2 or 5 sec to reach at the top from the bottom.
Therefore for downward direction the motion will be,
u = 0, acceleration, a= g= 10 m/s2, t = 5 sec
Let the maximum height is h
hence h = 1/2 x g x t2 = 1/2 x 10 x 52 = 125 m