Answer
The proof is below.
Work Step by Step
We know that when the balloon is floating, it is necessary for the buoyancy force to at least equal to the force of gravity on the balloon (and the air in it). Thus, we find:
$ \rho_a Vg = (m_g+M)g \\ \rho_a V = m_g + M$
We know that the volume is equal to $\frac{m_g}{\rho_g}$. This gives:
$\rho_a \frac{m_g}{\rho_g}= m_g + M$
Simplifying gives:
$m_g = \frac{\rho_g M}{\rho_a-\rho_g}$