Option (D) is correct.
Explanation: Step 1: A×B=B×A forces A=B. Both sets are non-empty. Take any a∈A and any b∈B. Then (a,b)∈A×B=B×A, so a∈B and b∈A. As a and b were arbitrary, A⊂B and B⊂A, so A=B. (If A=B, the two products are clearly equal.)
Step 2: solve {1,2,k}={2,3,m}.
- 1∈A, so 1∈B. Since 1=2 and 1=3, we need m=1.
- 3∈B, so 3∈A. Since 3=1 and 3=2, we need k=3.
With (k,m)=(3,1), A=B={1,2,3} and A×B=B×A=A×A. No other pair works.
Why the other options are wrong
- (A) (1,3) gives A={1,2} and B={2,3}. Then (1,2)∈A×B, but (1,2)∈/B×A because 1∈/B.
- (B) (2,2) gives the same sets A={1,2} and B={2,3}, so the same pair (1,2) breaks the equality.
- (C) is false: (k,m)=(3,1) makes A=B, and then the two products are equal.