as a proposed exercise, I am trying to prove the Schröder–Bernstein theorem using a different approach. So first, based on the following definitions: let $A, B$ be non-empty sets and functions $f: A \rightarrow B$ and $g: B \rightarrow A$, such that $f$ and $g$ are one-to-one. Define recursively $\forall n\geq 1$:
$$ A_0 := A, B_0 := B, A_1 := g(B_0), B_1 := f(A_0), A_2 := g(B_1), B_2 := f(A_1), ... $$ Basically, $$ A_n := g(B_{n-1}), B_n := f(A_{n-1}) $$
I must (for the moment and in what I need help with) prove that: $$ |A|=|A_0|=|B_1|=|A_2|=|B_3|=|A_4|=... $$
I'm trying to prove this by induction. I have already done the (base) cases $|A_0|=|B_1|$ and $|B_1|=|A_2|$ by showing there is, in fact, a bijective function between them (by restricting the respective codomain and using the inverse functions of $f$ and $g$, respectively). However, I am having trouble proving the rest of the cases (I'm stuck with no ideas). I do not have a clear path in how to use induction for this.
What I have tried so far is something along the lines of:
Assume that the following is true for $k\geq 0$:
$|A_{2k}|=|B_{2k +1}|$
Then, prove that it holds for
$|A_{2(k+1)}|=|B_{2(k+1) +1}|$
Basically, using induction, but my issue is that I honestly do not know how to connect what I did (and how I did it) on the base cases with this. I believe I'm having trouble with how to use the idea of restricting the codomain each time (it is not clear to me). I know this speaks more about my lack of understanding of what I am doing, but I would appreciate any pointers on how to proceed or any ideas on how I can make it easier to follow or how to put it into words.
Also, English is not my first language so I'm sorry for any grammar mistakes.