A can do a piece of work in 40 days. He works at it for 8 days and then B fineshes the remaining work in 16 days. How long will they take to complete the work if they do it together.
X can DO the work in 40 days. He works at it for 8 days and that means he's finished 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. Y finishs 1/20 th of the work in one day.
Since they work together their speeds add up and the time take t to complete the entire work W will be:
t = W / (Speed of X + Speed of Y) = W / (W/40 + W/20) = 1/ (1/40 + 1/20)
= (40 * 20) / (40 + 20) = 800/60 = 40 / 3 = 13 1/3 days = 13 days + (1/3) * 24 hours
= 13 days and 8 hours.