Let A and B be two sets such that A∩X = B∩X = ∅ and A∪X = B∪X for some set X.
To show: A = B
It can be seen that A = A∩(A∪X) = A∩(B∪X) (A∪X = B∪X) = (A∩B)∪(A∩X) (Distributive law) = (A∩B)∪∅ (∵ A∩X = ∅) = A∩B. (1)
Now, B = B∩(B∪X) = B∩(A∪X) (∵ A∪X = B∪X) = (B∩A)∪(B∩X) (Distributive law) = (B∩A)∪∅ (∵ B∩X = ∅) = B∩A = A∩B. (2)
Hence, from (1) and (2), we get A = B.