The equation for amount of work done is w=rth, where w represents the work done, r the rate, t the time, and h the number of people or things doing work.
So with the first sentence we have 5=r(20)(5), which simplifies to 5=100r, so r=1/20. Now we substitute this into the equation for our second sentence.
9=(1/20)(t)(9)
9=9/20t
t=20 minutes.