The cardinality of the union of A and B would be m+n if they have no elements in common, that is, A⋂B={ }.
If A⋂B≠{ } the cardinality is m+n-N(A⋂B).
Example: A={ 1,3,5,7,9 }, m=5; B={ 2,4,6,8 }, n=4; N(A⋂B)=0.
A⋃B={ 1,2,3,4,5,6,7,8,9 }, N(A⋃B)=9=5+4.
Example: B={ 2,3,6,7 }, n=4. A⋂B={ 3,7 }, N(A⋂B)=2.
A⋃B={ 1,2,3,5,6,7,9 }, N(A⋃B)=7=m+n-N(A⋂B)=5+4-2.