Just look at properties of both and see whats different ....
Dont know exact answer, but its two solids (i think), so maybe sieving, if particle size varies, umm i think the sodium would be soluble but magnesium hydroxide would not ( or maybe slightly soluble) and then use filtration. Maybe you...