The empirical formula is the formula in which we use the least subscripts for each atom in it.
We have magnesium and bromine
The their molar masses are:

So, the number of moles of each in the sample is:

Their ratio is:

That is, their ratio is about 1:1, thus, the empirical formula is MgBr.