answer -1 If you want an electron configuration just in shells, then you can use the rules that shells fill from the nearest to the nucleus (n=1) out wards, and that the first shell can hold up to 2 electrons, then subsequent shells hold up to 8 electrons. this works up to calcium (20 electrons), after which we start to see additional filling of the inner shell and it gets a bit more complicated. So, if we use these rules for phosphorus, which has 15 electrons, then we get an electron configuration of [2,8,5].
If we need subshell notation, then we use the filling order for the subshells in order of increasing energy of the subshell: