Let
$$x_1=\text{number of elements belonging to exactly one of }A,B,C$$
$$x_2=\text{number of elements belonging to exactly two of }A,B,C$$
Since $$A\cap B\cap C=\emptyset$$
there are no elements belonging to all three sets.
Also, $$A\cup B\cup C=X$$ and $$|X|=7$$
Hence $$x_1+x_2=7$$
Now count total memberships.
Since $$|A|=|B|=|C|=3$$ the total number of memberships is $$|A|+|B|+|C|=9$$
On the other hand, each element counted in exactly one set contributes 1,and each element counted in exactly two sets contributes 2.
Therefore,
$$x_1+2x_2=9$$
Subtracting
$$x_1+x_2=7$$ from $$x_1+2x_2=9$$ gives $$x_2=2$$
Hence
$$x_1=5$$
So among the 7 elements:
- 5 elements belong to exactly one set,
- 2 elements belong to exactly two sets.
First choose the 2 elements that belong to exactly two sets:
$$\binom72=21$$
For each of these 2 elements, choose which pair of sets contains it.
Possible pairs are
$$(A,B),\ (B,C),\ (C,A)$$
Thus
$$3^2$$
choices.
Now consider the remaining 5 elements.
Each must belong to exactly one of
$$A,\ B,\ C$$
Let
$$n_A,n_B,n_C$$
be the numbers assigned exclusively to
$$A,B,C$$
respectively.
The two doubly-assigned elements contribute a total of 4 memberships.
Since total memberships in each set must be 3, let
$$d_A,d_B,d_C$$
be the number of times the doubly-assigned elements occur in
$$A,B,C$$
respectively.
Then
$$n_A=3-d_A$$
$$n_B=3-d_B$$
$$n_C=3-d_C$$
and
$$n_A+n_B+n_C=5$$
because there are 5 singly-assigned elements.
The pair-types of the two doubly-assigned elements determine
$$d_A,d_B,d_C$$.
Count according to the distribution of the two pair-types.
Case 1: Both doubly-assigned elements use the same pair.
There are
$$3$$
choices.
For example, both are of type
$$(A,B)$$.
Then
$$d_A=d_B=2,\quad d_C=0$$
Hence
$$n_A=1,\quad n_B=1,\quad n_C=3$$
Number of assignments of the 5 single elements:
$$\frac{5!}{1!1!3!}=20$$
Contribution:
$$3\times20=60$$
Case 2: The two doubly-assigned elements use different pairs.
Choose ordered pair-types:
$$3\times2=6$$
choices.
For example,
$$(A,B)$$
and
$$(A,C)$$.
Then
$$d_A=2,\quad d_B=1,\quad d_C=1$$
Hence
$$n_A=1,\quad n_B=2,\quad n_C=2$$
Number of assignments:
$$\frac{5!}{1!2!2!}=30$$
Contribution:
$$6\times30=180$$
Total assignments for the remaining 5 elements:
$$60+180=240$$
Finally,
$$\text{Total}=\binom72\times240$$
$$=21\times240$$
$$=5040$$
Final Answer :
$$5040$$