There is a way to do this that seems to me more appropriate than relying on "explicit" functions.
First, you use the function:
$\phi: \mathbb{N}\times \mathbb{N} \rightarrow \mathbb{N}$
given by $\phi(n,m)=2^n.3^m$
This function is injective.(#1 why?) Here, we could invoke the Cantor-Bernstein-Schroeder theorem (with the way back being obvious), but we can use the fact that any infinite subset of a countable set is countable (#2 why?) (meaning we can make a bijection $\nu$ from it to $\mathbb{N}$)
So, call "$A$" the image of $\phi$. Then we have:
$\displaystyle \mathbb{N}\times \mathbb{N} \xrightarrow{\phi} A \xrightarrow{\nu} \mathbb{N}$
And the composition is a bijection from $\mathbb{N}\times \mathbb{N}$ to $\mathbb{N}$.
Now, a bijection from $\mathbb{Z}$ to $\mathbb{N}$ is easy (#3 why?) (Hint: just "count" the integers going forwards and backwards - formalize this as an exercise, if you don't know.)
It rests to show that there is a bijection from $\mathbb{Z}\times \mathbb{Z}$ to $\mathbb{N}\times \mathbb{N}$. But this follows from the bijection from $\mathbb{Z}$ to $\mathbb{N}$ (#4 why?)