J.R. S. answered 04/13/18
Tutor
5.0
(145)
Ph.D. University Professor with 10+ years Tutoring Experience
We need to know the Ksp for Mg(OH)2 and for Ca(OH)2.
You have the following situation:
Mg2+ + 2NaOH ==> Mg(OH)2(s) + 2Na+(aq)
Ca2+ + 2NaOH ==> Ca(OH)2(s) + 2Na+(aq)
To find [Mg2+] remaining after addition of NaOH, one needs to know the Ksp for Ca(OH)2 assuming it precipitates first, and then also the Ksp for Mg(OH)2.