So ,john completes 5 tasks in 27 min ,and bob completes the same 5 tasks in 54 min .
This means john is 2 times faster than bob.In this case john will complete 10 tasks in 54 min .So in 54 min the both of them will complete 15 tasks together.easily to see that 5 tasks will be complete in54/3 =18 min.