Answer
$m=M\dfrac {2a}{g+a}$
Work Step by Step
Firstly we need to find the vertical force acting on the balloon $Mg-F=Ma\Rightarrow F=M\left( g-a\right) \left( 1\right) $ Lets assume the mass thrown from the balloon is $m$ after thrown the mass balloon starts to accelerate with magnitude of acceleration $a$ Upwards. At that time total mass of balloon will be $M-m$ So $F-\left( M-m\right) g=\left( M-m\right) a\Rightarrow m=M-\dfrac {F}{g+a}\left( 2\right) $ From (1) and(2) we get $m=M\dfrac {2a}{g+a}$