Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I suspect that one wouldn't necessarily be able to recover that $M < Z(G)$. For example, let $G = (Z \times A) \rtimes (B_1 \times B_2)$ where $Z$, $A$, $B_1$ and $B_2$ are groups of order p generated by $z, a, b_1, b_2$ respectively and $[b_i, a] = z$. If $H = \langle z, a, b_1 \rangle$ and $K = \langle z, a, b_2 \rangle$, then $G$ is not the central product of $H$ and $K$ but something more general (I don't have a name for it), however I believe that $\mu$ is still an isomorphism of $R$-algebras. Perhaps you'd need to assume $M < Z(H)$ and $M < Z(K)$.
I had a proof which used the fact that $R[H] \otimes_R R[K] \cong R[H \times H]$ and the augmentation ideal of $R[M]$. However, I think that the proof that Todd Leason provides below is probably clearer.