In his book Analysis 1, the author Tao states Fubini's theorem as follows
Let $f:N \times N \rightarrow \mathbb{R}$ be a function such that $\sum_{(n,m)\in N\times N}f(n,m) $ is absolutely convergent. Then we have
$$\begin{align*}\sum_{n=0}^{\infty}\Bigg(\sum^{\infty}_{m=0}f(n,m)\Bigg) &=\sum_{(n,m)\in N \times N}f(n,m) \\&=\sum_{(m,n)\in N \times N}f(n,m)\\&=\sum_{m=0}^{\infty}\Bigg(\sum^{\infty}_{n=0}f(n,m)\Bigg)\end{align*}$$
He says that the second inequality follows from the rearrangement of absolutely convergent series. But that theorem is for bijective functions $f:N\rightarrow N$.
How can we use it to obtain the second equality in the theorem stated above ?