Schröder–Bernstein Theorem proof help In Understanding Analysis, there's is a guided Schröder–Bernstein Theorem proof as an exercise.

I'm trying to prove it on my own but I believe I'm confused on several points and would appreciate some aid and corrections where necessary. Here's what I have so far:
a) By partitioning the domains, if we prove that $f$ from $A$ to $B$ and $g$ from $B'$ to $A'$ are bijective, then we can write a function:
$$h(x)=\begin{cases} f(x)\text{ if}\ x\in A \\ g^{-1}(x)\text { if}\ x\in A'\\ \end{cases}$$
that is bijective and concludes the proof.
b) We know that $A_1=X\backslash g(Y)$ and all subsequent $A_n$s are $A_n\subseteq g(Y)$. Thus $A_1\ne A_2$ and inductively, as $f$ is 1-1 and so $f(Z)\ne f(Z')$ when $Z\ne Z'$ and the same goes for $g$, we have $g(f(Z))\ne g(f(Z'))$ when $Z\ne Z'$ and so $g(f(A_n))\ne g(f(A_{n-1}))$.
Thus the $A$s are disjoint pairwise and with the same logic the $B$s are also disjoint.
c) I don't get that, it seems true by definition to me...
d)For every $x\in B'$, $x$ can't be in any $f(A_n)$ for all $n$ and for all $g(x)$, as one generation of $A$ feeds the next and $g(x)$ not in $A_1$, then $g(x)$ not in any $A_n$.
(I'm not very happy about d. to be honest).
 A: Question c
I agree that there is not much to say here... Maybe that $f$ is well defined as the $A_n$ are supposed to be disjoint. And onto as $B$ is a union of images of subsets of $X$ under $f$.
Question d
Take $a^\prime \in A^\prime$. $a^\prime$ has at least a preimage $b^\prime$ under $g$ as otherwise it would belong to $A_1 = X \setminus g(Y)$. If $b^\prime$ belong to $B$, it exists $N \ge 1$ such that $b^\prime \in f(A_N)$ and then $a \in A_N$ with $b^\prime = f(a)$. Which implies the contradiction $a^\prime = g(b^\prime) = g(f(a)) \in A_{N+1}$. Therefore $b^\prime$ belongs to $B^\prime$ and $g : B^\prime \to A^\prime$  is onto.
A: As to $(a)$, note that $f$ is 1-1, so $f\restriction_A$ is too, so $f: A \to B$ is indeed bijective (as assume $f: A\to B$ is onto), and so is $g: B' \to A'$ and its inverse $g^{-1}: A' \to B'$ (which then exists!) for the same reason. As $A$ and $A'$ partition $X$, $h$ is well-defined and so $$h[X]= h[A \cup A']=h[A] \cup h[A']= f[A] \cup g^{-1}[A'] = B \cup B' = Y$$ and $h$ is onto as well. That $h$ is 1-1 follows from the facts that $f$ is 1-1 on $A$, $g^{-1}$ on $A'$ and that they are mapped into disjoint sets so 1-1 ness is preserved (if $x \neq x'$, there are three cases: both in $A$, and then $f(x)\neq f(x')$ by $f$ being 1-1 so $h(x)\neq h(x')$, both in $B'$ and then $h(x)=g^{-1}(x) \neq g^{-1}(x')=h(x')$ as $g^{-1}$ is 1-1, or (say) $x \in A$ and $x' \in A'$ and then $h(x) \in B$ and $h(x') \in B'$ so distinct too..) So $(a)$ needs actual arguments to show.
$(b)$: (parenthetical question) if $A_1 =\emptyset$, $g[Y]=X$ and $g$ is already a bijection between $Y$ and $X$ and we'd be done.
$(c)$ is true because unions and images under $f$ commute:
$$f[A]=f[\bigcup_{n=1}^\infty A_n] = \bigcup_{n=1}^\infty f[A_n] =: B$$
$(d)$ and $(b)$ need better arguments.
A: I wish I could have made this clearer. But it is difficult. Do let me know if there are confusions. Also, please correct me if I am wrong.
Part A
Since
\begin{eqnarray*}
\forall a'\in\mathbb{A}'\exists b'\in\mathbb{B}'\text{ s.t. }g(b')=a'\land\forall b_1,b_2\in\mathbb{B}'\exists a_1=g(b_1),a_2=g(b_2)\in\mathbb{A}'\text{ s.t. }b_1\neq b_2\rightarrow a_1\neq a_2
\end{eqnarray*}
there exists a function $g^{-1}:\mathbb{A}'\rightarrow\mathbb{B}'$. Since
\begin{eqnarray*}
\forall b'\in\mathbb{B}'\exists a'=g(b')\in\mathbb{A}'\text{ s.t. }g^{-1}(g(b'))=b'
\end{eqnarray*}
it is onto. Since
\begin{eqnarray*}
\forall a_1,a_2\in\mathbb{A}'\exists b_1,b_2\in\mathbb{B}'\text{ s.t. }g(b_1)=a_1\neq a_2=g(b_2)&\rightarrow&b_1\neq b_2\\
g^{-1}(a_1)&=&g^{-1}(g(b_1))\\
&=&b_1\\
&\neq&b_2\\
&=&g^{-1}(g(b_2))\\
&=&g^{-1}(a_2)
\end{eqnarray*}
it is one-to-one. Define
h(x) =
\begin{cases}
f(x) &x\in\mathbb{A}\\
g^{-1}(x) &x\in\mathbb{A}'
\end{cases}
Since both functions are one-to-one and onto, the statement holds.
Part B
Trivially, if $A_1=\emptyset$, then $g$ is bijective and $\mathbb{X}\sim\mathbb{Y}$. Besides,
\begin{eqnarray*}
\forall x\in f(\mathbb{A}_1)&\rightarrow&x\in\mathbb{Y}\\
&\rightarrow&f(\mathbb{A}_1)\subseteq\mathbb{Y}
\end{eqnarray*}
Suppose $\forall i\in\mathbb{N}\mathbb{A}_1\bigcap\mathbb{A}_i\neq\emptyset$, then,
\begin{eqnarray*}
\exists x\in\mathbb{X}\text{ s.t. }x\in\mathbb{A}_1\bigcap\mathbb{A}_2&\rightarrow&x\in\mathbb{A}_1\land x\in\mathbb{A}_i\\
&\rightarrow&x\in\mathbb{X}\land x\notin g(\mathbb{Y})\land x\in g(\cdots f(\mathbb{A}_1)\cdots)\\
&\rightarrow&x\notin g(\mathbb{Y})\land x\in g(\mathbb{Y})
\end{eqnarray*}
Hence, by contradiction, the statement doesn't hold. Suppose inductively, $\forall i,j\leq k\text{ s.t. }A_i\bigcap A_j=\emptyset$ and $P(k+1)$ doesn't hold. Then,
\begin{eqnarray*}
\exists x\in\mathbb{X}\exists1<i\leq k+1\text{ s.t. }x\in\mathbb{A}_{k+1}\bigcap\mathbb{A}_i&\rightarrow&\exists y_{i-1}\in f(A_{i-1}),y_k\in f(A_k)\text{ s.t. }y_{i-1}\neq y_k\\
&\rightarrow&g(y_{i-1})=x=g(y_k)
\end{eqnarray*}
By contradiction, the induction holds. Since
\begin{eqnarray*}
\forall i\neq j\in\mathbb{N}\mathbb{A}_i\bigcap\mathbb{A}_j=\emptyset\land\forall x_1\neq x_2\in\mathbb{X}f(x_1)\neq f(x_2)&\rightarrow&\forall x_i\in\mathbb{A}_i,x_j\in\mathbb{A}_j\text{ s.t. }f(x_1)\neq f(x_2)\\
&\rightarrow&f(\mathbb{A}_i)\bigcap f(\mathbb{A}_j)=\emptyset
\end{eqnarray*}
Hence, the statement holds.
Part C
\begin{eqnarray*}
\forall b\in\mathbb{B}'\exists n\in\mathbb{N}\text{ s.t. }b\in f(A_n)&\rightarrow&\exists a\in\mathbb{A}_n\text{ s.t. }b=f(a)
\end{eqnarray*}
Hence, the statement holds.
Part D
Suppose $\mathbb{A}'$ is empty. Then,
\begin{eqnarray*}
\mathbb{X}=\mathbb{A}&\rightarrow&\mathbb{X}=\bigcup_{n=1}^{\infty}A_n\\
&\rightarrow&\forall x\in\mathbb{X}\exists\mathbb{A}_n\text{ s.t. }x\in\mathbb{A}_n\\
&\rightarrow&\exists b\in\mathbb{B}'\text{ s.t. } b\in f(\mathbb{A}_n)\\
&\rightarrow&\mathbb{X}=g(\mathbb{Y})\\
g:\mathbb{Y}\rightarrow\mathbb{X}&\rightarrow&\mathbb{X}\sim\mathbb{Y}
\end{eqnarray*}
By contradiction, it isn't empty. Hence,
\begin{eqnarray*}
\forall x\in\mathbb{A}'&\rightarrow&x\in\mathbb{X}\backslash\mathbb{A}\\
&\rightarrow&x\in\mathbb{X}\land x\notin\mathbb{A}_1\cdots\\
&\rightarrow&x\in\mathbb{X}\land (x\not\in\mathbb{X}\lor x\in g(\mathbb{Y}))\land x\in g(f(\mathbb{A}_1))\land\cdots\\
&\rightarrow&x\in\mathbb{X}\land x\in g(\mathbb{Y})\land x\notin g(f(\mathbb{A}_1))\land\cdots\\
&\rightarrow&\forall n\in\mathbb{N},\exists b\in\mathbb{Y}\text{ s.t. }b\notin f(\mathbb{A}_n)\\
&\rightarrow&b\in\mathbb{Y}\land b\in\notin\bigcup_{n=1}^{\infty}A_n\\
&\rightarrow&b\in\mathbb{Y}\backslash\mathbb{B}\\
&\rightarrow&b\in\mathbb{B}'
\end{eqnarray*}
Hence, the statement holds
