Bijection between set of ring homomorphisms and group of units 
Let $R= \mathbb{Z} [X,Y]\big/(XY-1)$ and $S$ be commutative rings. Prove there exists an bijection between the set of ringhomomorphisms $R \to S$ and the group of units $S^*$. 

A little thing I figured is that for a unit $s \in S$, with $s=f(a_1), s^{-1}=f(a_2) $ we have:
$1_S=ss^{-1}=f(a_1)f(a_2)=f(a_1a_2)=f(1_R)$
So $a_1$ is a unit with inverse $a_2$.
 A: First, I'll define a ring homomorphism, let $s\in S$ be a unit with inverse $s^{-1}$.  We define the following map,
$$ \phi_s:\mathbb{Z}[X,Y]/(XY-1)\longrightarrow S$$
by
$$f(X,Y)\mapsto f(s,s^{-1}) $$
This homomorphism is independent of your choice of representative in $\mathbb{Z}[X,Y]/(XY-1)$.  Indeed let $\bar{f}=\bar{g}$ in our quotient ring.  Then we have that for some $h(X,Y)\in \mathbb{Z}[X,Y]$ we have,
$$f(X,Y)=g(X,Y)+h(X,Y)(XY-1) $$
Now applying our ring homomorphism yields,
$$ f(s,s^{-1})= g(s,s^{-1})+h(s,s^{-1})(ss^{-1}-1)=g(s,s^{-1}) $$
The properties of a ring homomorphism can be verified.  So given an element of $S^*$ we can find a corresponding ring homomorphism.
Now let $$\phi:\mathbb{Z}[X,Y]/(XY-1)\longrightarrow S$$  be any ring homomorphism.  We know that a ring homomorphism must take the element one in the domain to the element one in the range.  The coset for one in $\mathbb{Z}[X,Y]/(XY-1)$ is given by $\bar{1}=1+(XY-1)$, in particular this coset contains the element $XY$, so we can choose this for our representative.  So we apply our ring homomorphism, and knowing that one gets sent to one, we have,
$$\phi(1)=\phi(XY)=\phi(X)\phi(Y)=1$$
So we have that $\phi(X)$ gets sent to some unit and $\phi(Y)$ gets sent to that unit's inverse.  Each homomorphism is determined by what it sends $X$ and $Y$ to.  Therefore, given a homomorphism, we can associate a unit $s=\phi(X)$.  Thus, we have established a bijective correspondences between ring homomorphisms and the group of units $S^*$
