Both of these compounds contain two types of bonding:
Ionic Bonding: Ionic bonding occurs between charged ions. There is an ionic bond between the ion `~Mg^2^+` and the polyatomic ion hydroxide (`~OH^- ` ) in the compound `~Mg(OH)_2` . There is also an ionic bond between the ion `~Sr^2^+` and the polyatomic ion phosphate `~PO_4^3``~^-)` in the compound `~Sr_3(PO_4)_2.`
Covalent Bonding: Covalent bonding occurs when atoms share electrons. There is a covalent bond between the atoms O and H in the polyatomic ion . There is also a covalent bond between the P atom and the O atoms in the polyatomic ion .
To draw the Lewis dot structures for these compounds, you must first draw the Lewis dot structures for the covalently bonded polyatomic ions. Then, you can show the Lewis dot structure for the ionic bond between the positively charged ions (`~Mg^2^+` and `~Sr^2^+`) and the polyatomic ions.
Please see the attached image.