A can do a piece of work in 14 days while B can do it in 21 days. They began together and worked at it for 6 days. Then, A fell ill and B had to complete the remaining work alone. In how many days was the work completed?

A's one day work=1/14

B's one day work=1/21

{A+B} one day work=1/14+1/21=5/42

they both work 6 day =5/42*6=5/7

B had to complete the remainig work=1-5/7=2/7

B had to complete the work=2/7 is divided by 1/21

divide change into mutiply=2/7*21/1=6

total time taken =6+6=12