Its inorganic as MgCO3 is contains no carbon more hydrogen which is a crutial component of all organic compounds
Energy levels inside an atom are the specific energies that electrons can have when energy occupies specific orbitals. Electrons can be excited to higher energy levels by absorbing energy from the surroundings, an equivalent light is emitted when an electron returns from a high energy state to a lower one. Representation of this diagrammatic is known as the energy level diagram.
This question is asking for an element with 5 valence electrons. Just go to the row it is in (excluding transition metals) and count over.
The answer would be c. P