Bromine has 4 energy levels, because its electron number (35) fills four energy levels worth of orbitals. Barium's position on the periodic table gives it an unfilled orbital with 2 valence electrons. Calcium has 4 energy levels, and 2 valence electrons, so the answer is (D), Calcium.