(a) Consider $f(n) = 2n$ and $g(n) = \begin{cases} 2n, & \mbox{if } n \mbox{ is even} \\ 4, & \mbox{if } n \mbox{ is odd}, \end{cases} $. Then $g$ is left inverse of $f$, since we have $(g\circ f)(n) = g(n/2) = n$ for all $n \in \mathbb{Z}$ but not right inverse of $f$ since $(f\circ g)(n) = \begin{cases} n, & \mbox{if } n \mbox{ is even} \\ 8, & \mbox{if } n \mbox{ is odd}, \end{cases} $.
(b) Suppose there's another inverse $h$. Then $h(n/2) = n$, therefore $h(n/2) = g(n/2)$ hence $g = h$