Let $R$ be arbitrary and let $(e_1,e_2,...,e_n)$ be a basis for $R^{(n)}$. Show that $(f_1,...,f_m)$, $f_j=\sum_{j^\prime=1}^na_{j^\prime j}e_j$ is a basis for $R^{(m)}$ if and only if there exists an $n\times m$ matrix $B$ such that $AB=I_m$, $BA=I_n$ where $A=(a_{ij})$, $I_m$ is the usual $m\times m$ unit matrix and $I_n$ is the $n\times n$ unit matrix. Hence show that $R^{(m)}\simeq R^{(n)}$ if and only if there exists $A\in M_{m,n}(R),B\in M_{n,m}$ such that $AB=I_m,BA=I_n$.
There is a post discussing there may be a typo in this question and it does make sense. However, the second part of the statement "hence,..." in this problem still does not make sense to me. I also checked out this post. Basically how to make sense of and prove the second statement?