Solution (source code)

= Solution

Now $m_1=m_2=n$ and the first two <matrix representations> agree in the chosen <bases>. Each of $P_{11},P_{12},P_{21},P_{22}$ is therefore a commuting <endomorphism> of that common <irreducible representation>, so each is scalar by the <Schur lemma>. All blocks connecting either of these copies with the third vanish, since the third <irreducible representation> is inequivalent. Hence
$$
\boxed{P=\begin{pmatrix}
aI_n&bI_n&0\\
cI_n&dI_n&0\\
0&0&eI_{m_3}
\end{pmatrix},\qquad a,b,c,d,e\in\mathbb C.}
$$
Every such <matrix> commutes with $R(g)$. In particular the off-diagonal scalars $b,c$ can mix the two identical copies. The <commutant of a semisimple representation> is $M_2(\mathbb C)\oplus\mathbb C$, of complex <dimension> five. If the first two <representations> were merely equivalent, rather than literally equal, the mixed blocks would instead be scalar multiples of a fixed invertible <intertwiner> and its inverse.