You are correct. The third shell has a capacity for electrons of 18.

If we look at quantum theory of anatom, we find sub-shells and orbitals. Spin of electrons is another topic. I will spare you the details, but one rule applies to this question: the Aufbau Principle or the n+l Rule.

Three sub-shells make up the third shell, 3s,3p, and 3d.

The fourth shell contains 4 sub-shells: 4s, 4p and 4d.

You can also determine the sequence of filling different sub-shells using (n+l). The electron enters the sub-shell that has the lowest value of (n+l). If (n+l is equal), then the electron will enter the sub-shell with the lowest value of n.

(n=no. (n=no.)

The values of l for subshells s,p.d.f are 0,1,2 and 3, respectively. They can accommodate electrons at 2,6,10 and 14, respectively.

Therefore, 3d (3+2=5) is more valuable than 4s (4+0=4). Instead of traveling to the 3d orbital the electron prefers being accommodated in 4s where energy is less.

The universe prefers to use the least amount of energy.

Here’s your solution.

The shell in which the electron entered into its last shell is what gives us our period number. The electrons take up 3s and 3p shells (total electrons = 6=8, thus 8 elements), then they fill 4s, before returning to 3d. Your question is a result of the fact that 3d can hold 10 electrons.