Question: a can do a work in 40 days?
Answer: X can the work in 40 days. He works at it for 8 days and that means he's finished a fifth of the work (1/5). Now Y took 16 days to finish the rest of the work, which means he finished 4/5 th of the work in 16 days and will take 16 * 5/4 = 20 days to finish the work on a whole. X finishes 1/40 th of the work in one day.