Question: a can do a piece of work in 18 days?
Answer: In 18 days, A can do a piece of work. ∴ In 1 day, A can do (1/18)th part of the work. ∴ In 12 days, A can do 12×(1/18) th part of the work = (12/18) = (2/3)rd part of the work. So, (1/3)rd of the work is completed by B in 8 days.