If $g: A\rightarrow B$ is a ring homomorphism and $M$ is a flat $A$-module. Then $M_{B}=B\otimes_{A}M$ is flat $B$-module.
We need to prove if $f:S\rightarrow T$ is injective, then $f\otimes 1: S_{B}\otimes( B\otimes_{A}M)\rightarrow T_{B}\otimes (B\otimes_{A}M)$ is injective. But this is the same as $f\otimes 1: (S_{B}\otimes B)\otimes_{A}M=S\otimes_{A}M\rightarrow (T_{B}\otimes B)\otimes_{A}M=T\otimes_{A} M$ is injective by canonical isomorphism. Then this would make us treat $S\otimes_{A}M$ as an $A$-module by having $a(s\otimes m)=g(a)s\otimes m=s\otimes am$. Since $M$ is flat, the above sequence must be injective.
Is this properly justified? I feel unclear because $S\otimes_{A}M$ should be treated as a $B$ module instead. Should I prove $f\otimes 1: S\otimes_{A}M\rightarrow T\otimes_{A}M$ is injective given $f:S\rightarrow T$ is injective directly instead? This can be done $f(s)\otimes m=0\Leftrightarrow f(s)=0\wedge m=0\rightarrow s\otimes m=0$ but feels somehow cumbersome to use. Notice there is a similar question asked in here: math.stackexchange.com/questions/120835/change-of-base-property-for-flat-modules