How to get the following isomorphism $\phi$?

There is an exercise of the book "Rings and category of modules":

Let $R$ and $S$ be two rings. $_RM_S$ is a faithfully balanced bimodule. Show that there is a ring isomorphism $\phi: Cen R \rightarrow Cen S$ such that $km=m \phi(k)$ for all $m \in M$ and $k \in Cen R$. ($Cen R$ means the centre of the ring $R$)

I don't know how to get the isomorpism. Thank you for any help.

Well, all you have to work with is an isomorphism $\lambda:R\to End(M_S)$ and an isomorphism $\rho:S\to End(_RM)$, so start with those.
Let $r\in Cen(R)$. Since $r$ is central, $\lambda(r)$ is not only right $S$ linear, it is also left $R$-linear. That means there exists a unique $s\in S$ such that $\lambda(r)=\rho(s)$. Explicitly, that means $rm=ms$ for all $m\in M$.
The question arises: is $s$ necessarily central in $S$? Well, you tell me, just compute: for an arbitrary $s'\in S$, $mss'=(rm)s'=\ldots$ You will eventually use the fact $\rho$ is an isomorphism to conclude $s$ is central.
If we call the restriction of $\lambda$ to the center of $R$ as $\bar\lambda$, we are apparently looking at $\phi=\rho^{-1}\bar\lambda:Cen(R)\to Cen(S)$.
This furnishes you an injective homomorphism, but don't forget to show that it is surjective too. One strategy might be to argue by symmetry that a pair of similar maps $\psi=\lambda^{-1}\bar\rho$ is an inverse homomorphism for $\phi$.