Let volume of the bucket be 1 litre
Portion of the bucket filled by pipe A in 1 min = 1/12
Portion of the bucket filled by pipe B in 1 min = 1/15
Portion of the bucket filled by pipes A and B together in 1 min
+== At the end of 4 minutes, pipe A is closed.
Portion of bucket filled by A and B together in 4 min = 4 × 3/20 = 3/5
Remaining portion to be filled = 1 – 3/5 = 2/5
As a has left, the remaining portion will be filled by B
Time - taken to fill this portion by B
==6min