While standing on a bridge over a gorge, a person throws a ball upward with a velocity of 40 m/s. How many seconds after that must his friend drop his ball from rest, so that both balls strike the bottom of the gorge, 20 m below, at the same time?

how long does it take the thrown ball to hit?

20 + 40t - 4.9t^2 = 0
How long does it take the dropped ball to hit?
20 - 4.9t^2 = 0

subtract one time from the other
Or, you can just figure that when you drop the 2nd ball, it's the same as if you threw the other ball at the same time, with a downward speed of 40 m/s.