A and B can do a piece of work in 45 days and 40 days respectively. They began to do the work together but A leaves after some days and then B completed the remaining work in 23 days. The number of days after which A left the work was  Choose the correct choice:
A) 5 days B) 6 days C) 7 days D) 9 days E) 8 days

Rationale: "does the job in 40 days = 1 / 40 a & b together completes the job = ? after a leaves , b completes the remaining job in 23 days . i . e b ' s part of job in 23 days = 23 / 40 remaining part 17 / 40 is done by a & b together in x no . of days . i . e ( x / 45 ) + ( x / 40 ) = 17 / 40 = > x = 9 days answer : d"
Answer: D