Let A∪B = Y, B\A = M, A\B =N & X\Y = L. Then X is the disjoint union of M, N, L & A ∩ B. Now A ∩ B = {2, 3, 5, 7, 8} is fixed. The remaining seven elements 1, 4, 6, 9 10, 11, 12 can be distributed in any of remaining sets M N, L
This can be done in 37 ways. Of there if all the elements are in the set L then A = B = {2, 3, 5, 7, 8} and this case has to be omitted. Hence the total number of pairs {A, B} such that A ⊆ X, B ⊆ X, AB and A ≠ B = {2, 3, 5, 7, 8} is 37 - 1.