Let \( F \) denote the force exerted on the balloon. The initial force equation, considering mass \( m \), is:
\[
F - mg = ma
\]
Upon release of mass \( x \), the force equation modifies to:
\[
F = ma + mg
\]
Following the release of mass \( x \), the governing equation is:
\[
F - (m - x)g = (m - x) 3a
\]
Substituting the expression for \( F \) from the preceding equation:
\[
Ma + mg - mg + xg = 3ma - 3xa
\]
Solving for \( x \), we obtain:
\[
x = \frac{2ma}{g + 3a}
\]