You can do this if you assume there is no other source of magnesium or fluoride contributing to the system.
Have you written down your Ksp expression yet? And if so, is there anything you know that relates the amount of magnesium to the amount of fluoride?