Dual Commutes with Base Change
Note that the RHS can be written $\text{Hom}_R(M, S)$. More generally, we might ask when we have
$$\text{Hom}_R(M, N) \otimes_R S \cong \text{Hom}_R(M, N \otimes_R S).$$
for three $R$-modules $M, N, S$. (Special cases of this general question occur frequently here and on MO: see, for example, here, here, and here.) The answer is no in general but yes if any of the following conditions holds.
- $M$ is finitely presented and $S$ is flat.
- $S$ is finitely presented and $M$ is projective.
- $M$ is finitely presented projective.
- $S$ is finitely presented projective.
A simple counterexample to the desired statement at the maximum level of generality is given by $R = \mathbb{Z}, M = S = \mathbb{Q}$. Note that here neither $M$ nor $S$ are finitely presented, and that $M$ is torsion-free.
a) Your morphism $f:S \otimes_R \operatorname{Hom}_R(M, R) \to \operatorname{Hom}_S(S \otimes_R M, S)$ is in general not bijective, as shown by the example ($R=\mathbb Z,S=\mathbb Z/2,M=\mathbb Z/2)$ $$\mathbb Z/2 \otimes_\mathbb Z \operatorname{Hom}_\mathbb Z(\mathbb Z/2,\mathbb Z )=0 \to \operatorname{Hom}_{\mathbb Z/2}(\mathbb Z/2 \otimes_\mathbb Z \mathbb Z/2, \mathbb Z/2)=\mathbb Z/2$$
b) Your morphism is an isomorphism whenever at least one of the two modules $A$-modules $B$ or $M$ is projective of finite type: Bourbaki, Algebra, Chapter II, §5.4, Prop.8, page 283.