I am trying to understand proof of the mentioned theorem. So let $f:A\rightarrow B$ and $g:B\rightarrow A$ be injective maps. Then there exists a bijection from $A$ to $B$. I tried to understand following steps, and after intuitive picture of the proof given in Charles Pugh's Real Mathematical Analysis, I confused in one step.
(1) If $f(A)=B$, then $f$ is a required bijection from $A$ to $B$; similarly if $g(B)=A$ then $g$ is a required bijection.
(2) Thus, assume that $f(A)<B$ (proper subset) and $g(B)<A$.
(3) Using injectivity of $f$ and $g$, along with (2), we can obtain two strictly decreasing sequences of subsets: one in $A$ and other in $B$:
$$A > g(B) > gf(A) > gfg(B) > gfgf(A) > \cdots $$ and $$B>f(A) > fg(B) > fgf(A) >fgfg(B) > \cdots $$
(4) Think of set $A$ and $B$ as pictorially represented as rings, and all above subsets as proper subrings.
Then the key step (observation) is
annulus $A\setminus g(B)$ is bijection with annulus $f(A)\setminus fg(B)$ (under $f$) and
annulus $B\setminus f(A)$ is in bijection with $g(B)\setminus gf(A)$ (under $g$.
(5) Once (4) is complete, ignore first two anuli in above two series; argue in similar way for next two.
Q. The above sequence of sets is countable strictly decreasing sequence of subsets of $A$ and of $B$. But we do not know, whether given $x\in A$, it will lie in some annuli or not. Thus, it seems that above bijections is incomplete; something is remained in the proof. How should I complete the proof?
This isn't a very clear write-up, and it's missing a key step. Here's how I would phrase it (although actually I prefer a different argument entirely):
First, we change notation a bit to make things easier to write: we'll let $S_i$ denote the $i$th annulus of $A$ (so $S_0=A\setminus g(B), S_1=g(B)\setminus gf(A),$ etc.) and $T_i$ denote the $i$th annulus of $B$ (so $T_0=B\setminus f(A), T_1=f(A)\setminus fg(B)$, etc.).
Next we show that $S_{2n}\equiv T_{2n+1}$ and $T_{2n}\equiv S_{2n+1}$ for each $n$ (e.g. $S_0$ is in bijection with $T_1$, $S_1$ is in bijection with $T_0$, $S_2$ is in bijection with $T_3$, $S_3$ is in bijection with $T_2$, etc.).
But we're not done yet (and this is the step Pugh omits): why need we have $A=\bigcup_{i\in\mathbb{N}}S_i$ (and similarly for $B$)? Indeed this doesn't need to hold in general (suppose there is some $a\in A$ such that $gf(a)=a$ ...). So we also have to consider the "bad sets" $$X=A\setminus(\bigcup_{n\in\mathbb{N}}S_n)\quad\mbox{and}\quad Y=B\setminus (\bigcup_{n\in\mathbb{N}}T_n).$$ Now you need to show that $f$ is a bijection between $X$ and $Y$. Once you've done that, you'll be done: you'll have partitioned $A$ into one family of sets, $B$ into another family of sets, and "paired up" those families such that bijections exist appropriately.