Hi rohantewari
If you draw a Venn diagram you will see that you are overlapping the three categories, creating three small portions that represent an element that belongs to those two and one portion, where you will find an element that represents the three of them.
So, when you start adding all those numbers you will be adding the three big circles, one time the "middle" portion and one time the "smallest" portion. In total, you will be adding one time the three big circles, two times the 3 "middle" and two times the "smallest". But bear in mind that to get to the result you only need to add once every portion.
That is why you subtract one time each "middle" portion and two times the "smallest". Using the example, that is why you multiply 1 by 2. You are subtracting those two small parts you don´t need, only leaving one.
I hope this is clear enough for you!