Solution (source code)

= Solution

Assume an isotropic, stationary spherical <galaxy cluster>. Its three-dimensional <velocity dispersion> obeys $\langle v^2\rangle=3\sigma_{\rm los}^2$. For a uniform sphere, the <virial theorem> gives $3M\sigma_{\rm los}^2=3GM^2/(5R)$, hence
$$
\boxed{M_{\rm dyn}\simeq\frac{5R\sigma_{\rm los}^2}{G}=9.4\times10^{14}M_\odot.}
$$
A different <density profile> changes the coefficient, so $10^{15}M_\odot$ is the meaningful scale. For isothermal <X-ray> gas in <hydrostatic equilibrium>,
$$
M(r)=-\frac{k_BTr}{G\mu m_p}\frac{d\ln\rho_g}{d\ln r}.
$$
Using $\mu=0.6$ and a representative slope $-d\ln\rho_g/d\ln r=2$–$3$ at $1\,\mathrm{Mpc}$ gives $M_X\simeq(1.3$–$1.9)\times10^{15}M_\odot$. The <temperature> and extent alone cannot fix this coefficient without a <density profile>. The total <luminosity> is $5\times10^{12}L_\odot$, so the previously inferred <mass-to-light ratio> gives
$$
\boxed{M_\star\simeq4.50(5\times10^{12})M_\odot=2.25\times10^{13}M_\odot.}
$$