you have to minus the probability of intersection of set A and B. the way i understand it: for example, if A is {1,2,3} and B is {3,4,5}, AUB is {1,2,3,4,5}, not {1,2,3,3,4,5}. if you added probability of obtaning A and probability of obtaining B, and did not minus the intersection, you would have calculated the probability of obtaining 3 twice, that's why u have to minus the probability of the intersection ( the probability of obtaining a 3)
take note that when A and B are mutually exclusive, then P(AUB)=P(A)+P(B). when they are mutually exclusive, none of the elements of A and B are the same. In one trial you either get something from A or from B, you cannot get a result that is from both A and B like the 3 just now. if they are mutually exclusive, something like "A is {1,2,3} and B is {3,4,5}" is impossible. Possible scenario is that it will be like "A is {1,2,3} and B is {4,5,6}".
when it is not mentioned to be mutually exclusive, you cannot assume that it is. like in this question
Another way of looking at it: Imagine there are 1000 items the 1/20 of 1000= 50 will have defect A and 1/10 of 1000= 100 will have defect B. Since the two defects are independent (1/20)(1/10)= 1/200 of 1000= 5 will have both defects. So 50- 5= 45 will have only defect A, 100- 5= 95 will have only, 5 will have both defects and 1000- 45- 95- 5= 855 will have no defects.
Thus the probability of both defects is 5/1000= .005, probability of defect A only is 45/1000= .045, probability of defect B only= 95/1000= .095, and probability of no defects is 855/1000= .855.