Localization of prime ideals Let $A$ be a commutative ring with $1$. Suppose that $P \subseteq Q$ are prime ideals in $A$ and that $M$ is an $A$-module. Prove that the localization of the $A$-module $M_{Q}$ at $P$ is the localization $M_{P}$, i.e $(M_{Q})_{P} = M_{P}$.
Hint from the book: Use the fact that $S^{-1}A \otimes _{A} M \cong S^{-1}M$ as $S^{-1}A$ modules.
Here's what I have:
First set $S=A \setminus P$ and $T=A \setminus Q$, then by assumption $T \subset S$.
So using the hint:
$S^{-1}(T^{-1}M) \cong S^{-1}A \otimes_{A} T^{-1}M

\cong S^{-1}A \otimes_{A} (T^{-1}A \otimes_{A} M)

\cong (S^{-1}A \otimes_{A} T^{-1}A) \otimes_{A} M$
From here I'm stuck. Can you please help?
 A: How about:
Noting that $(A_Q)_P=A_P$,
$$(M_Q)_P=(A_Q)_P \otimes_{A_Q} M_Q = A_P \otimes_{A_Q} (A_Q \otimes_A M)=(A_P \otimes_{A_Q} A_Q) \otimes_A M =A_P \otimes_A M = M_P$$
Added later:
The prove $(A_Q)_P=A_P$, map $$A_P \rightarrow (A_Q)_P$$ by $$a/s \mapsto (a/1)/(s/1)$$
This is injective, and if we choose $(a/t)/(s/t') \in (A_Q)_P$, then this is hit by $at'/st \in A_P$, since $(at'/1)/(st/1)=(a/t)/(s/t')$ in $(A_Q)_P$.
A: This is a little messy, but it works:
Note that $S^{-1}A$ and $T^{-1}A$ are naturally $(A,T^{-1}A)$-bimodules, so that, as $(A, T^{-1}A)$-bimodules,
$$S^{-1}A \otimes_A T^{-1}A \simeq (T^{-1}A \otimes_{T^{-1}A}S^{-1}A) \otimes_A(T^{-1}A \otimes_{T^{-1}A}T^{-1}A)$$
$$\simeq (S^{-1}A \otimes_{T^{-1}A}T^{-1}A) \otimes_A(T^{-1}A \otimes_{T^{-1}A}T^{-1}A)$$
$$\simeq S^{-1}A \otimes_{T^{-1}A}((T^{-1}A \otimes_AT^{-1}A) \otimes_{T^{-1}A}T^{-1}A)$$
$$\simeq S^{-1}A \otimes_{T^{-1}A}T^{-1}A \simeq S^{-1}A$$
Now just substitute this in your sequence of isomorphisms and use the definition.
A: It should be easy to show, using the universal property of tensor products of algebras and that of localization, that for each $A$-algebra $f\colon A \to B$ with $f(S) \subset B^*$ there is a unique homomorphism of $A$-algebras $S^{-1}A \otimes_A T^{-1}A \to B$. Here the $A$-algebra structure $A \to S^{-1}A \otimes_A T^{-1}A$ is given by $a \mapsto a \otimes 1 = 1 \otimes a$.
