The correct option is B K+,Cl−,Ca2+,Sc3+
Consider the number of electrons in each of the options carefully:-
A) Ba2+−54,Sr2+−36,K+−18,Ca2+−18
B) K+−18,Cl−−18,Ca2+−18,Sc3+−18
C) N3−−10,O2−−10,F−−10,S2−−18
D) Li+−2,Na+−10,Mg2+−10,Ca2+−18
Hence option B is the right answer.