Let $R$ be a unital commutative ring and let $S,T$ be multiplactive subsets of $R$ where $$\forall x\in S,y\in T,\exists n\in\mathbb N, x^n\in T,y^n\in S$$ Show that $\exists$ a natural isomorphism $S^{-1}R\to T^{-1}R$. In addition show that $\forall f\in R, R_f=R_{f^n}$.
Attempt:
We would like to define $$\phi:S^{-1}R\to T^{-1}R$$ according to the rule: Let ${r\over s}\in S^{-1}R$. $T\ne\emptyset$ because $1\in T$. Thus $\exists\bar n:s^\bar n\in T$. Hence we can define $n:=\min\{\bar n\in\mathbb N:s^\bar n\in T\}$. We define $\phi({r\over s}):={r\over s^n}$.
I didn't success to show that $\phi$ is injective nor surjective. Is there more 'natural' morphism $S^{-1}R\to T^{-1}R$?
Let $\frac rs\in S^{-1}R$. Then there exists $n\in\Bbb N$ with $t:=s^n\in T$. Define $$\phi(\tfrac rs)=\frac{s^{n-1}r}{t}.$$
(I) This is welldefined: If $\frac rs=\frac{r'}{s'}$ (say, $ (rs'-r's)s''=0$) and $t':=(s')^{n'}$, we need to show that $\frac {s^{n-1}r}{t}=\frac{s'^{n'-1}r'}{t'}$, i.e., that there exists $t''\in T$ with $$ (s^{n-1}rt'-s'^{n-1}r't)t''=0$$ $$\iff (s^{n-1}rs'^{n'}-s'^{n-1}r's^n)t''=0$$ $$\iff s^{n-1}s'^{n-1}(rs'-r's)t''=0.$$ Apparently we can take $t''=s''^{n''}$ for suitable $n''$.
(II) $\phi$ is additive: By (I), we may assume that the summands have a common denominator and then indeed $$\begin{align}\phi\left(\frac{r_1}s+\frac{r_2}s\right)&=\phi\left(\frac{r_1+r_2}s\right)\\&=\frac{s^{n-1}(r_1+r_2)}{t}\\&=\frac{s^{n-1}r_1}t+\frac{s^{n-1}r_2}t\\&=\phi\left(\frac{r_1}s\right)+\phi\left(\frac{r_2}s\right).\end{align}$$
(III) $\phi$ is multiplicative: If $t_1=s_1^n\in T$ and $t_2=s_2^{m}\in T$, then $(s_1s_2)^{nm}=t_1^mt_2^n\in T$ and $$ \begin{align}\phi\left(\frac {r_1}{s_1}\frac {r_2}{s_2}\right) &=\phi\left(\frac{r_1r_2}{s_1s_2}\right)\\&=\frac{(s_1s_2)^{nm-1}r_1r_2}{t_1^mt_2^m} \\&=\frac{s_1^{nm-1}r_1}{s_1^{nm}}\frac{s_2^{nm-1}r_2}{s_2^{nm}}\\&=\phi\left(\frac{r_1}{s_1}\right)\phi\left(\frac{r_2}{s_2}\right).\end{align}$$
(IV) $\phi$ is an isomorphism: For $\frac rt\in T^{-1}R$, there exists $m\in\Bbb N$ with $s:=t^m\in S$. This allows us to define $\psi(\tfrac rt)=\frac{t^{m-1}r}{s}$ in the other direction. This is clearly inverse to $\phi$.
(V) $\phi$ is natural: The way we constructed $\phi$ it is clear that the construction commutes with any suitable homomorphisms.
Apparently, the condition can be generalized to: "For all $s\in \in S$ there exists $\hat s\in S$ with $s\hat s\in T$ and for all $t\in T$ there exists $\hat t\in T$ with $t\hat t\in S$."