A & B can do a picec of work in 20 days & 30 days respectively . they started the work together but B left the work 5 days before its compleat. in how many days the whole work was completed?

is your ans 15 days
no 17 days
s sorry bro your final ans will be 14 days


In 20 days 'A' do 1 piece of work.
So in 1 days 'A' do 1/20 piece of work.
so, in 5 days 'A'  do 5/20 = 1/4 piece of work.
In 30 days 'B' can do 1 piece of work.
So in 1 day 'B' can do 1/30 piece of work.
So in 5 days 'B' can do 5/30 = 1/6 piece of work.
therefore in 1 day A+B can do 1/20+1/30 = 1/12 piece of work.
Given that B left the work 5 days before   its complete .
then left work complete by 'A' in last 5 days.
so we can say that left work = woke done in 5 days by A = 1/4 piece
so ,Finally we can say that (1-1/4 = 3/4) piece of work done together by A+B
we know that,
A+B can do 1/12 piece of work in 1 day
So,A+B can do 1 piece of work in 1÷1/12 = 12 days
So ,A+B can do 3/4 piece of works in  12×3/4 = 9 days 
so 3/4 work was completed by A and B in 9 days.
and left work(1/4 piece) was completed by A in 5 days.
Therefore whole work was completed in 9+5 = 14 days
Work done by A in 1 day=1/20
Work done by B in 1 day=1/30
Their 1 day's work=1/20+1/30=5/60=1/12
so, They will take 12 days to complete the work.
So,B worked 12-5=7 days
so, A and B's 7 days work=1/12*7=7/12
Remaining work=1-7/12=5/12
Given,A does 1 work in 20 days.
So, A will do 5/12 work in 20*5/12=25/3  days.=8 days 8 hours.
Total time taken to complete the work=7 days+8 days 8 hours
=15 days 8 hours

yeah,I understood your process,The question is not saying that. I had also confused before start to soln. In the question, it is not mentioned that B left the work before 5 day that they could cooperate to complete it, rather he left before it completed.It means, they were working together for a work and B left the work after some day ,then A completed it in 5 days .
Are you going with me or against me?