Proving that $f$ is a bijection from $N$x$N$ to $N$.

Since $2b-1$ and $2y-1$ are odd, they will never be powers of $2$. So $2^{x-1} = 2^{a-1}$, which implies that $a = x$. Divide $2^{x-1}$ and $2^{a-1}$ out. You are left with an equation giving you $y = b$.


We don't need to use prime factorization here; the deepest fact that we need is that there is no integer that is both even and odd.

Suppose $2^{a−1}(2b−1)=2^{x−1}(2y−1)$. Without loss of generality, $a\le x$; so we can divide both sides by $2^{a−1}$ and obtain $2b-1 = 2^{x-a}(2y-1)$ (note that $2^{x-a}$ is an integer by our assumption). If $a<x$, then $2^{x-a-1}$ is still an integer, and so the right-hand side is $2\cdot 2^{x-a-1}(2y-1)$ which is even; but the left-hand side is odd, which is a contradiction. Therefore $a=x$, which gives $2b-1=2y-1$ and so $b=y$ as well.