[tex]n(X\cup Y)=n(X)+n(Y)-n(X\cap Y)[/tex]
If [tex]X[/tex] and [tex]Y[/tex] share no common elements, then [tex]n(X\cap Y)=0[/tex], which means [tex]n(X\cup Y)=n(X)+n(Y)=47[/tex]
On the other hand, if the smaller set is entirely contained within the larger set, i.e. [tex]Y\subseteq X[/tex], then [tex]X\cap Y=Y[/tex], and so [tex]n(X\cup Y)=n(X)+n(Y)-n(Y)=n(X)=28[/tex].