This is part of exercise 11 b) of the book "Abstract Algebra" by Dummit and Foote.
Let $R$ and $S$ be rings with 1 and let $M$ and $N$ be left $R$-modules. Assume also that $N$ is an $(R,S)$-bimodule.
(a) For $s \in S$ and for $\varphi \in \operatorname{Hom}_R(M, N)$ define $(\varphi s): M \rightarrow N$ by $(\varphi s)(m)=\varphi(m) s$. Prove that $\varphi s$ is a homomorphism of left $R$-modules, and that this action of $S$ on $\operatorname{Hom}_R(M, N)$ makes it into a right $S$-module. Deduce that $\operatorname{Hom}_R(M, R)$ is a right $R$-module, for any $R$-module $M-$ called the dual module to $M$.
(b) Let $N = R$ be considered as an $(R, R)$-bimodule as usual. Under the action defined in part (a) show that the map $r \mapsto \varphi_r$ is an isomorphism of right R-modules: $Hom_R(R, R)\cong R$, where $\varphi_r$ is the homomorphism that maps $l_R$ to $r$. Deduce that if $M$ is a finitely generated free left R-module. then $Hom_R(M, R)$ is a free right $R$-module of the same rank. (cf. also Exercise 13.)
My idea was to use that $Hom_R(R,R) \cong R$ as right $R$-modules, and that, since $M \cong R^n$ for some $n$, \begin{equation} Hom_R(M,R) \cong Hom_R(R^n,R) \cong (Hom_R(R,R))^n \cong R^n \cong M, \end{equation}
which would prove the claim. Is this reasoning correct?