Calcium is in group IIA in the periodic table. A Ca ion has a charge of 2+. In order to solve this problem you can either see the periodic table or just look for the charge of the elemetns they give you.
K is group IA - charge of 2+
Magnesium IIA - charge 2+
Bromine VIIA charge of 1-
Scandium IB
The answer is B