Solution :
Part filled by pipe A in 1 minute = 1/60
Part filled by pipe B in 1 minute = 1/40
Part filled by both pipes A and pipe B in 1 minute = 1/60+1/40 = (2+3)/120 = 5/120 = 1/24
Suppose the tank is filled in x minutes
Then, To fill the tanker from empty state, B is used for x/2 minutes and
A and B is used for the rest x/2 minutes
x/2×1/40+x/2×1/24=1
⇒x/2[1/40+1/24]=1
⇒x/2×8/120=1
⇒x/2×1/15=1
x = 15×2 = 30 minutes