we know that in nutral state of atom , an atom have equal number of protons and electrons ,but in this question this atom is not nutral means it is charged
this atom have -1 charge this means it gains 1 electron .
in nutral state if an atom have equal number of proton and electron when the atom is charged(gain or lost certain amount of electron) number of electron become proton -the electron it losts or proton + the electron it gains
this atom have -1 charge this means it gains 1 electron so the number of electron calculated by ; proton + the number of electron it gains; this atom have 17 protons so , number of electron =17+1=18