The given details are,
A can do a piece of work in = 40 days
A’s 1 day work = 1/40
B can do a piece of work in = 45 days
B’s 1 day work = 1/45
(A+B)’s 1 day work together = 1/40 + 1/45
A+B’s 10 day work together = 10 (1/40 + 1/45)
= 10 ((9+8)/360) (by taking LCM for 40 and 45 which is 360)
= 10 × 17/360
= 17/36
Remaining work = 1 – 17/36
= (36 – 17)/36
= 19/36
∴ A can finish the remaining (19/36) work in = (19/36)/(1/40)
= (19/36) × 40
= 190/9
= 21 1/9 days