Is my solution to the following problem correct?
Given $A \rightarrow B$ morphism we have $B \otimes_A M$ is flat given that $M$ is flat.
Since $M$ is a flat module then for every monomorphism $S_1 \rightarrow S$ of A modules the induced map $M \otimes_A S_1 \rightarrow M \otimes_A S$ is injective.
Suppose we have $N_1 \rightarrow N$ is a monomorphism of $B$-modules (Notice they can be identified as $A$-modules.)
Consider $(B \otimes_A M) \otimes_B N_1 \cong N_1 \otimes_B (B \otimes_A M) \cong N_1 \otimes_A M$.
Since $M$ is a flat module then $N_1 \otimes_A M \rightarrow N \otimes_A M$ is an injection but as before $(B \otimes_A M) \otimes_B N \cong N \otimes_A M$ and $(B \otimes_A M) \otimes_B N_1 \cong N_1 \otimes_A M$. Therefore the induced map $(B \otimes_A M) \otimes_B N_1 \rightarrow (B \otimes_A M) \otimes_B N$ is an injection, thus $B \otimes_A M$ is a flat $B$-module.
This is correct. To be a bit more precise, what you need is not just that $(B \otimes_A M) \otimes_B N \cong N \otimes_A M$ but that this is a natural isomorphism of functors in $N$. That guarantees that when you identify the modules via these isomorphisms, the induced map $N_1 \otimes_A M \rightarrow N \otimes_A M$ corresponds to the induced map $(B \otimes_A M) \otimes_B N_1 \rightarrow (B \otimes_A M) \otimes_B N$.