This key exchange algorithm is broken for matrices using the same technique as I described in the answer to your previous question.
As before, let $Z_{A}=X_{A}^{-1},Z_{B}=X_{B}^{-1}$.
Observe that $S_{A}=M_{A}P_{B}=Z_{A}P_{A}P_{B}$. Observe that $S_{B}=P_{A}M_{B}=P_{A}P_{B}Z_{B}$ as well.
A pseudo private key for Alice is a matrix $Z_{A}^{p}$ such that $S_{A}=Z_{A}^{p}P_{A}P_{B}$.
A pseudo private key for Bob is a matrix $Z_{B}^{p}$ such that $S_{B}=P_{A}P_{B}Z_{B}^{p}$.
An adversary can easily compute the affine space of all pseudo private keys for Alice and the affine space of all pseudo private keys for Bob just by solving a collection of linear equations.
If $Z_{A}^{p}$ is a pseudo private key for Alice, then
$$M_{A}M_{B}=M_{A}P_{B}Z_{B}=S_{A}Z_{B}=Z_{A}^{p}P_{A}P_{B}Z_{B}=Z_{A}^{p}S_{B}.$$
If $Z_{B}^{p}$ is a pseudo private key for Bob, then $$M_{A}M_{B}=Z_{A}P_{A}M_{B}=Z_{A}S_{B}=Z_{A}P_{A}P_{B}Z_{B}^{p}=S_{A}Z_{B}^{p}.$$
Therefore, an adversary who knows a little bit of linear algebra can recover the shared key $M_{A}M_{B}$.