A rock is ejected vertically upward at 40 m/s. At what time is the rock moving at 20 m/s upward.

v = Vi - g t

20 = 40 - 9.81 t
9.81 t = 20
t = 20/9.81