can the cardinality of a set be a fraction? $A$ and $B$ be two sets and define $n(S)$ to be the cardinality of a set $S$. If $n(A-B)=18, n(A∪B)=70$, and $n(A∩B)=25$, find $n(B)$.
i got it by first subtracting $n(A∪B)=70$, and $n(A∩B)=25$ so
$70-25=45$
then i subtracted it from  $n(A-B)$ so $45-18=27$
then to get $n(B) =$
$$
\frac{27}{2}=13.5
$$
but it's a fraction so I'm confused

No, the cardinality of a finite set must be a nonnegative integer.
As to what you are doing, one error is the division by $2$; there is simply no reason to do that, because you are not double counting anything.
When you subtacted $n(A\cap B)$ from $n(A\cup B)$, you obtained the number of elements that are in $A$ but not $B$, or in $B$ but not $A$.
If you then subtract the number of elements that are in $A$ but not $B$, you are simply left with the number of elements in $B$ but not $A$. There is no double counting.
If you then want to figure the number of elements in $B$, you want to "add back in" the elements you are missing, which are the elements in both $A$ and $B$, $n(A\cap B)$.
A quicker alternative way of computing $n(B)$ is to note that you can take $A\cup B$, elements that are in either $A$ or $B$, and subtract those that are in $A$ but not $B$, namely $n(A\cup B) - n(A-B)$. You should find that both computations give the same answer.
