FOR THE TABLE:
Mg has an atomic number of 12. This means it has 12 protons and starts with 12electrons before bonding. It may be helpful to draw these ones out at first until you get the hang of it. If Magnesium has 12 electrons then it will have 3 shells of electrons before it bonds. 2 electrons in the first shell. and 8 in the second shell.When it bonds with Cl₂ it will lose the outer most shell of electrons. now it has only 2+8 electrons because Cl₂ stole the other two electrons to satisfy their octet. Therefore, Mg will have the configuration of the noble gas that has an atomic number of 10 and each Cl atom will have the noble gas configuration of the noble gas with 18 as their atomic number because each chlorine stole one electron.
For CO₂ I knew it was Polar covalently bonded because Carbon has an electronegativity value of 2.5 and Oxygen has and electron negativity value of 3.5. In order to be a POLAR covalent bond the difference in electronegativity between atoms must between 0.4 and 1.8. 3.5-2.5= 1 . Because 1 is between 0.4 and 1.8 these C-O bonds are polar covalent.
LiH was a tricky one because the electronegativity difference wasn't that high, but apparently it is still considered an ionic bond. H steals one of Li's 3 e- so that they both have 2 electrons and look like Helium.
Hope my pictures help a little. This was a tough homework so please ask if you are still confused about something and I'll try my best to clarify.