Time taken by tap A to fill the cistern = 4 hours.
Work done by tap A in 1 hour = 1/4ᵗʰ
Time taken by tap B to empty the full cistern = 6 hours.
Work done by tap B in 1 hour = -1/6ᵗʰ (since, tap B empties the cistern).
Work done by (A + B) in 1 hour (¹/₄ - ¹/₆) = (3 - 2)/12 = 1/12th part of the tank is filled.
Therefore, the tank will fill the cistern = 12 hours.