Problem: Let $R$ be commutative ring, and $f,g\in R$. Define $S_f:=\{1,f,f^2,...\}$, and denote by $R_f$ to the localization of $R$ at $S_f$. Similarly define $R_g$ and $R_{fg}$. Show that $$R_f\otimes_R R_g\cong R_{fg}.$$
For this one, I have come up with no ideas to find such bijection. Any insight on this, I appreciate. Thanks in advance!
Hint. It is best to use universal properties here. $\otimes_R$ is the coproduct in the category of commutative $R$-algebras, and $R_f$ is the initial commutative $R$-algebra in which $f$ becomes invertible. The claim follows immediately from the fact that $fg$ is invertible in some commutative $R$-algebra iff $f$ and $g$ are. Namely, this shows exactly that $R_f \otimes_R R_g$ and $R_{fg}$ have the same universal property, hence are isomorphic by the Yoneda Lemma.