Set questions in SSC and bank exams usually describe a survey: so many people like tea, so many like coffee, some like both and some like neither. Every one of them rests on one counting rule. When you add the two groups, the people in both get counted twice, so you take them out once:
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
Here n(A ∪ B) is the number in at least one set and n(A ∩ B) the number in both. Anyone outside both sets is "neither", so total = n(A ∪ B) + neither.
Worked example 1: tea and coffee
In a group of 60, 35 like tea, 30 like coffee and 10 like neither. How many like both?
At least one = 60 − 10 = 50. Both = 35 + 30 − 50 = 15.
Once you know "both", the rest follows: tea only = 35 − 15 = 20 and coffee only = 30 − 15 = 15.