I can think about two approach below.
Please check it out. It may be helpful.
A can build a house in 20 days. And B can break it in 30 days.
METHOD -1Lets take LCM of (20,30) = 60 . 60 be the unit of work to do.
A works on 1st day and B on 2nd day and so on.
Day 1 -In 1 day A can finish - 60/20 = 3 unit of work.
Day 2 -In 1 day B can break- 60/30 = 2 unit of work.
So after day 2. Total work that was done - 1 unit of work.
Implies, it will take 120 days to complete - 60 unit of work.
=> Here is the most important part of the question. => (Assume once the house gets build, they will stop working)Lets think about it. Try to go in reverse gear.
B completed - 120 days -> 60 unit of work.
A completed - 119 days -> 62 unit of work = 60+2 (work done by B on 120th day).
B completed - 118 days -> 59 unit of work = 62 -3 (work done by B on 119th day).
A completed - 117 days -> 61 unit of work = 59 + 2 (work done by B on 118th day).
B completed - 116 days -> 58 unit of work. = 61 - 3 (work done by A on 117th day).
A completed - 115 days -> 60 unit of work. = 58 + 2 (work done by B on 116th day).
Answer - B => 115 days.METHOD -2We can do it directly in a go if we use our visualization skill.
Lets take LCM of (20,30) = 60 . 60 be the unit of work to do.
A works on 1st day and B on 2nd day and so on.
Day 1 -In 1 day A can finish - 60/20 = 3 unit of work.
Day 2 -In 1 day B can break- 60/30 = 2 unit of work.
So after day 2. Total work that was done - 1 unit of work.
Implies, it will take 120 days to complete - 60 unit of work.
But we need to realize that there is possibility of A completing the work before 120 DAYS as A is doing positive work.
Lets consider after 110 days.
After 110 days. Total work done is - 55.
After 112 days. Total work done is - 56.
After 114 days. Total work done is - 57.
Now hold on.
A can finish 3 unit of work in a day.
=> After 115 days. Total work done is - 60.
Answer B => 115.