Solution (source code)

= Solution

For a separately conserved homogeneous component, energy conservation gives $d(\rho c^2a^3)=-p\,d(a^3)$, equivalently $\dot\rho+3H(\rho+p/c^2)=0$. Dust has negligible pressure, while isotropic radiation has $p_\gamma=\rho_\gamma c^2/3$. Hence
$$
\boxed{\rho_M=\rho_{M0}a^{-3},\qquad\rho_\gamma=\rho_{\gamma0}a^{-4}.}
$$
The matter factor is volume dilution; photons additionally lose energy by <cosmological redshift>. Nonrelativistic baryons and <cold dark matter> both contribute to the matter term, so $\Omega_M=\Omega_B+\Omega_C$. At equality $\rho_{M0}a_{\rm eq}^{-3}=\rho_{\gamma0}a_{\rm eq}^{-4}$, giving
$$
\boxed{a_{\rm eq}=\frac{\Omega_\gamma}{\Omega_B+\Omega_C},\qquad1+z_{\rm eq}=\frac{\Omega_B+\Omega_C}{\Omega_\gamma}.}
$$
This is equality for the source's matter-plus-photon model. Additional relativistic species would contribute to total radiation and shift the equality value. Although the source calls the $\rho$'s energy densities, its Friedmann equation and later $\rho_\gamma c^2$ show that their consistent SI meaning is mass-equivalent density.