Understanding a proof of Schröder-Bernstein theorem Abbott's intro analysis text gives a guided exercise to work through the Schröder-Bernstein Theorem. There are two key (probably related) parts I do not understand.

Theorem: Let there be an injective function $f: X \rightarrow Y$ and another injective function $g: Y \rightarrow X$. Then there exists a bijection $h: X \rightarrow Y$.

Proof: Idea is to partition $X$ and $Y$ into $X = A \cup A'$ and $Y = B \cup B'$, with $A \cap A' = \emptyset$ and $B \cap B' = \emptyset$, such that $f$ maps $A$ onto $B$ and $g$ maps $B'$ onto $A'$.
So set $A_1 = X \setminus g(Y)$ and inductively define a sequence of sets by letting $A_{n+1} = g(f(A_n))$. The exercise had me prove that $\{A_n : n \in \mathbb{N}\}$ is a pairwise disjoint collection of subsets of $X$, while $\{f(A_n) : n \in \mathbb{N} \}$ is a similar collection in $Y$. Why does pairwise disjointness matter?
To conclude, let $A = \cup_{n=1}^\infty A_n$ and $B = \cup_{n=1}^\infty f(A_n)$. I showed that $f$ maps $A$ onto $B$ (trivial). Let $A' = X \setminus A$ and $B' = Y \setminus B$. Why does $g$ map $B'$ onto $A'$? This is such a key question that I feel bad admitting I need a hint.
 A: First lets check, that $g$ indeed maps to from $B' \to A'$. Suppose $g(b') \in A_n=g(f(A_{n-1}))$ for some $n$. So by injectivity we would have $b' \in f(A_{n-1})$, but this is already a contradiction. 
Now why is $g$ restricted to $B'$ onto? Suppose there is an element $a' \in A'$ that is not hit by any $b' \in B'$. Since $a'$ cannot be in $A_1$ there has to be an element $b \in f(A_n)\subset B$ s.t. $g(b)=a'$. Since $b \in f(A_n)$ we can write it as $f(a)=b$ and therefore $a'=g(f(a))\in A_{n+1}$. But this is a contradiction to where $a'$ lives.
I'm also not sure why the disjointness is of importance. You could argue that the $f(A_n)$ in which $b$ lies is only unique if this is the case. But this doesn't seem to matter much for the argument to work.
A: I agree with @maik-pickl that the "pairwise disjointness" is not necessary for the following proof, but just an interesting result that worth to mention and be verified by readers.
Note that the Exercise 8.3.2 from Analysis I by Terence Tao, which is used as a lemma for proving Schröder-Bernstein theorem (Exercise 8.3.3), contains a similar "verifying the disjointness" part as well.
By the way, the disjointness can be verified as follow (based on this solution):


*

*For $k \ge 2$, since $A_k = g(f(A_{k-1})) \subseteq g(Y)$, $A_k$ and $A_1$ are disjoint.

*For $2 \le m < n$, if there exists $a \in A_m \cap A_n$, then for some $a_{m-1} \in A_{m-1}$ and $a_{n-1} \in A_{n-1}$, $f(g(a_{m-1})) = a = f(g(a_{n-1}))$. Since both $f$ and $g$ are injective, here $a_{m-1} = a_{n-1}$. Hence $A_m \cap A_n \ne \emptyset$ implies $A_{m-1} \cap A_{n-1} \ne \emptyset$. By induction, we can conclude that $A_1 \cap A_{n-m+1} \ne \emptyset$, which is contradict with part 1. Therefore $A_m$ and $A_n$ are disjoint ($2 \le m < n$).

