Atiyah-MacDonald Ex 3.3, trouble with well definedness 
Let $A$ be a ring with $S,T$ multiplicative closed sets. Let $U$ be the image of $T$ under $f:A\rightarrow S^{-1}A$. Show that $U^{-1}(S^{-1}A)\cong (ST)^{-1}A$.

There is a slick answer to this question using universal properties of the inclusion into the localization (for example Isomorphism of ring localized twice - Atiyah Macdonald Exercise 3.3). However I'd like to get my hands dirty and work the elements.
Our relevant sets are the following:

*

*$S^{-1}{A}=\{(a,s)\mid a \in A \quad s \in S\}/\sim$

*$U^{-1}S^{-1}{A}=\{([(a,s)],(t,1))\mid a \in A \quad s \in S \quad t \in T\}/\sim$

*$(ST)^{-1}{A}=\{(a,p)\mid a \in A \quad p \in ST\}/\sim$
The trouble I'm encountering is if we try to define a map from $(ST)^{-1}{A}$ to $U^{-1}S^{-1}{A}$ we get in a little bit of trouble as we must chose a lift $(s,t)\in S\times T$ of $p\in ST$. If we try to define a map the other way I haven't been able to show well-definedness
 A: The map $U^{-1}(S^{-1}A)\to (ST)^{-1}A$ is the obvious one: given an element of the form
$$\frac{\quad\frac{a}{s}\quad}{\frac{t}{s'}}$$
send it to $\frac{as'}{st}$.
To verify that this is well-defined, assume first that
$$\frac{\quad\frac{a}{s}\quad}{\frac{t}{s'}} = \frac{\quad\frac{\alpha}{\sigma}\quad}{\frac{\tau}{\sigma'}}.$$
That means that there exists $\frac{t''}{s''}\in U$ such that
$$\frac{t''}{s''}\left(\frac{a\tau}{s\sigma'} - \frac{\alpha t}{s'\sigma}\right) = 0.$$
This is equivalent to asking that
$$\frac{t''}{s''}\left(\frac{a\tau s'\sigma - \alpha ts\sigma'}{ss'\sigma\sigma'}\right) = 0,$$
or that
$$\frac{t''(a\tau s'\sigma - \alpha ts\sigma')}{s''ss'\sigma\sigma;} = 0.$$
This in turn means that there exists $\sigma''\in S$ such that
$$\sigma''t'' (a\tau s'\sigma - \alpha ts\sigma') = 0.$$
On the other hand, to verify that $\frac{as'}{st} = \frac{\alpha\sigma'}{\sigma\tau}$, you would need the existence of some $s''\in ST$ such that
$$s''(as'\sigma\tau - \alpha\sigma'st) = 0.$$
But clearly you can take $s''=\sigma''t''$ to make this hold. So the map is well-defined.
