X and Y can do a piece of work in 20 days and 12 days respectively. X started the work alone and then after 4 days Y joined him till the completion of the work. How long did the work last?
Time taken by X to complete the work = 20 days
Time taken by Y to complete the work = 12 days
Work done by X in a day = 1/20
Work done by Y in a day = 1/12
Work done by X in 4 days = 4 $\times$ 1/20 = 1/5
Work remaining after 4 days = 1 - 1/5 = 4/5
Work done by X and Y together in 1 day = 1/20 + 1/12 = 2/15
X and Y together complete 2/15 work in 1 day
=> X and Y together complete the work in 15/2 days
=> X and Y together complete 4/5 work = 15/2 $\times$ 4/5 = 6 days
So the work is completed in (4 + 6) = 10 days.