Is the following allowed? Consider any two collections of sets $A=\{A_1,\ldots,A_n\}$ and $B=\{B_1,\ldots,B_m\}$ where the following holds:
$$\sum_{x\in A}|x|=\sum_{y\in B}|y|$$
Is it true that this statement is the same as
$$\sum_{x\in A}|x|-\sum_{y\in B}|y|=0$$
?
When talking about finite cardinalities it is vacuously true, but what about infinite sizes? It is not clear to me.

The equation $e_1=e_2$ is the same as $e_1-e_2=0$, as long as $e_1$ and $e_2$ are expressions with definite values in a structure where subtraction makes sense. Then it doesn't matter if $e_1$ and $e_2$ are infinite sums or other complicated things involving limits internally.
However, it sounds like the values of your expressions are infinite cardinals, which are not a domain where subtraction makes sense. If that is the case, then the second equations is ill-defined and therefore not equivalent to the first one.
(What you also can't do, at least without being quite careful, is rewrite your second equation to
$$ \Biggl ( \sum_{x\in A\cup B}\begin{cases} |x| & \text{for }x\in A \\ -|x| & \text{for }x\in B\end{cases} \Biggr) = 0 $$
even if $A$ and $B$ are disjoint.)
