a) Group 2 elements have 2 electrons on their outer shell, so they form a 2+ charge.
b) they lose 2 electrons as they are transferred to the non metal.
c)They obtain this charge as when they are made into an ionic compound the 2 electrons on the outer shell are transferred to the non metal, meaning there are 2 more protons that electrons, giving it a positive charge.