Solution:
Concept: n(A), the cardinal number of A, is the number of elements in A. The union A∪B splits into three parts with no common elements: A−B (only in A), A∩B (in both) and B−A (only in B). Adding n(A) and n(B) counts the middle part twice, so n(A∪B)=n(A)+n(B)−n(A∩B).
Step 1 — Part (i): find n(A).
A is made of the elements only in A and the elements in both.
n(A)=n(A−B)+n(A∩B)
n(A)=30+10=40
Step 2 — Part (ii): find n(B).
B is made of the elements only in B and the elements in both.
n(B)=n(B−A)+n(A∩B)
n(B)=20+10=30
Step 3 — Part (iii): find n(A ∪ B).
The union is made of the three separate parts: only A, both, and only B.
n(A∪B)=n(A−B)+n(A∩B)+n(B−A)
n(A∪B)=30+10+20=60
Step 4 — Check.
The rule n(A∪B)=n(A)+n(B)−n(A∩B) gives the same total.
n(A∪B)=40+30−10=60
Therefore, n(A)=40, n(B)=30 and n(A∪B)=60.