Number of days A required do a piece of work : 14 days
Number of days B required do a piece of work : 21 days
Work done by A in one day: \(\frac{1}{14}\)
Work done by B in one day: \(\frac{1}{21}\)
Work done by A and B together in one day: \(\frac{1}{14}+\frac{1}{21}=\frac{5}{42}\)
They can do the work together in \(\frac{42}{5}\) days .
A and B worked together for 6 days, so work completed by A and B in 6 days : 6 x \(\frac{5}{42}=\frac{5}{7}\)
Work left = \(1-\frac{5}{7}=\frac{2}{7}\)
Number of days taken by B to complete the left over work : \(\frac{2}{7}\times21\) = 6
6 ( here 21 is days required by B to complete a piece of work).
∴ Time taken to finish the work: 6 + 6 = 12 days.
∴ Total time taken to finish the work: 12 days