1st pipe takes 1 h to fill 1/2 part of the tank.
So, time taken to fill the whole tank (m) = 2 h
2nd pipe takes 1 h to 1/3 part of the tank
So, time taken to fill the whole tank (n) = 3 h
Let 3rd pipe takes P h to empty the tank = x
∴ 1/m + 1/n - 1/x = 7/12 ⇒ 1/2 + 1/3 - 1/x = 7/12
⇒ 1/x = (6 + 4 - 7)/12 = 3/12 = 1/4
∴ x = 4 h