a stone is projected vertically upward and reaches a maximum height of 20m before it returns to the thrower find the total time taken

It is easy to find the time it takes the object to fall 20 m, then double that time.

timetofall:
hf=hi+1/2 g t^2
t=sqrt(20*2/9.8)
then double that time.