\begin{equation*} P(A) &=\det(M_1)\det(M_2)P \begin{pmatrix} J_{2m_1}&0_{2m_1,2m_2}\\0_{2m_1,2m_2}&J_{2m_2}}\end{pmatrix} \\ &=(-1)^{m_1(m_1+1)/2}\det(M_1) . (-1)^{m_2(m_2+1)/2} \det(M_2) \\ & =P(A_1).P(A_2) \end{equation}
{}