determine the molarity of the following solution 31 g MgF2 in 55ml H20

mols = grams/molar mass.

Then M = mols/L soln.
Technically this problem can't be solved because the definition of M is mols/L solution. You have added MgF2 to 55 mL H2O. I'm sure your prof expects you to use 0.055 L BUT 31 g MgF2 in 55 mL H2O gives more than 55 mL of solution.