The given details are,
Inlet tap can fill a cistern in = 4 hours
Inlet tap can fill a cistern in 1 hour = 1/4
Outlet tap can empty the cistern in = 6 hours
Outlet tap can empty the cistern in 1 hour = 1/6
Work done by both pipe in 1 hour = (1/4 – 1/6)
= (3-2)/12
= 1/12
∴ When both tap and pipe are opened together the cistern can be filled in = 1/(1/12) = 12 hours.