For each $b \in B$, consider the map
$[b]:B \times M \to B\otimes_A M$
$(b',m) \mapsto bb'\otimes m.$
It is immediate that $[b]$ is bilinear and $A$-balanced, and thus factors through a homomorphism (which we also call $[b]$):
$[b]: B\otimes_A M \to B\otimes_A M$
given on simple tensors by $[b](b'\otimes m) =bb'\otimes m$.
It is immediate from this that $[b_1]\circ [b_2] = [b_1b_2]$, and that the collection of all these homomorphisms makes $B\otimes_A M$ into a $B$-module.
Note: to remember what module structures has a given tensor product, a good trick is this: if $A,B,C$ are any three rings (possibly non-commutative), and if $M$ is an $(A,B)$-bimodule (hence $M$ is a left $A$-module and a right $B$-module, and the two module structures are compatible), and $N$ is a $(B,C)$-bimodule, then $M\otimes_B N$ is an $(A,C)$-bimodule (just like the product of an $n\times m$ matrix with a $m \times p$ matrix has dimensions $n\times p$).
Also: (1) if $R$ is commutative, then every $R$-module is naturally an $(R,R)$-bimodule; (2) in general, a left $R$-module is the same thing as a $(R,\mathbf{Z})$-bimodule; (3) if $M$ is a right $R$-module and $N$ is a left $R$-module, $M\otimes_R N$ only has the natural structure of an abelian group (which is a $(\mathbf{Z},\mathbf{Z})$-bimodule).
In your problem $B$ is a $(B,A)$-bimodule, and $M$ an $(A,A)$-bimodule; hence $B\otimes_AM$ is a $(B,A)$-bimodule.