Question:
Tap A can fill a cistern in 8 hours and tap B can empty it in 12 hours. How long will it take to fill the cistern if both of them are opened together?
Solution:
Tap A can fill a cistern in 8 hours.
Part of cistern filled by Tap A in 1 hour $=\frac{1}{8}$
Tap B empties the cistern in 12 hours.
Part of cistern emptied by Tap B in 1 hour $=-\frac{1}{12}$ (negative sign shows that tap B drains the tank)
Part of cistern filled in one hour when both taps are opened together $=\frac{1}{8}-\frac{1}{12}=\frac{3-2}{24}=\frac{1}{24}$
Therefore, it will take 24 hours to fill the cistern.