First, we determine how many electrons can each subshell hold: s can hold 2 electrons p can hold 6 electrons d can hold 10 electrons f can hold 14 electrons
Second, we start distributing the 10 electrons on the orbitals of subshells based on the arrangement shown in the question : 1s will hold 2 electrons 2s will hold 2 electrons 2p will hold 6 electrons All other orbitals will will hold zero electrons as the 10 were distributed among the first 2