The problem here is that according to Aufbau Principle before 3d orbital 4s subshell comes.After filling 3p orbital with electrons you have 4 electrons left,you place two in 4s with opposite spin and the other two in 3d in any of its two orbitals of total five orbitals with same spin.