Answer:
a) Bes
b) KF
c) MgO
d) H2S
e) AlCl3
f) NaI
g) SrSe
h) Ga2O3
Explanation:
In the picture attached the electron dot representation of different elements is shown.
a) From the picture it an be seen that Beryllium has 2 valence electrons, to form a ionic compound it will lost them and transforms into 
Sulfur has 6 valence electrons, to form a ionic compound it will gain 2 electrons (to complete 8 electrons in its outer shell) and transforms into 
The ionic compounds are electrically neutral, so the charge combination of its ions must be zero. If we combine 1
cation with 1
anion the net charge will be: +2 + (-2) = 0. Then the formula is BeS.
The other cases are solved analogously.
b)
potassium cation: 
fluorine anion: 
compound formula: KF (net charge: +1 + (-1) = 0)
c)
magnesium cation: 
oxygen anion: 
compound formula: MgO (net charge: +2 + (-2) = 0)
d) hydrogen and sulfur don't make an ionic compound, they form hydrogen sulfide which is a covalent compound
e) aluminum and chlorine form AlCl3, which is covalent.
f)
sodium cation: 
iodine anion: 
compound formula: NaI (net charge: +1 + (-1) = 0)
g)
strontium cation: 
selenium anion: 
compound formula: SrSe (net charge: +2 + (-2) = 0)
h)
gallium cation: 
oxygen anion: 
compound formula: Ga2O3 (net charge: 2*(+3) + 3*(-2) = 0)