I have no idea on how to do this here is the question (For the following pairs of atoms, show how they transfer valence electrons, the charge of each ion that results, and then write the formula of the compound they form:) and here is one example (Magnesium and Iodine)