Call

and bromine forms a $Br^(-)$ ion...........

And so, if these ions are to make music together, and form a NEUTRAL ionic solid, we need 2 equiv of anion, and 1 equiv of metal ion:

$Mg^(2+) + 2Br^(-) rarr MgBr_2darr$

All I have done here is to conserve mass and charge. Are they conserved?