The rock is limestone, I hope this helps!!
The chemical formula for the compound magnesium perchlorate is Mg(ClO₄)₂
Magnesium perchlorate or Mg(ClO₄)₂ is an ionic compound.
Perchlorate here is an anion which is represented by ClO₄⁻. Perchlorate is a polyatiomic anion, where one Cl atom is bonded to four O atoms.
The magnesium cation is represented by Mg²⁺
So one Mg²⁺ cation combines with two ClO₄⁻ anion to form one molecule of Mg(ClO₄)₂
The electron configuration for magnesium is 1s22s22p63s2
The symbol of an isotope is:

A - the mass number
Z - the atomic number
X - the symbol of an element
The symbol of oxygen is O.
The atomic number is the same for all isotopes of one element. For oxygen it's 8, because every atom of oxygen has 8 protons in its nucleus.
The mass number is the number of nucleons (protons + neutrons) in the nucleus of an atom, and it's given in the name of an isotope. Oxygen-16 has the mass number 16, oxygen-17 has the mass number 17, oxygen-18 has the mass number 18.
Oxygen-16:

Oxygen-17:

Oxygen-18: