I would have to say neither (A), nor (B).
I assume that these are not the only options given to you, because both these electron configurations belong to atoms in their ground state.
The first one represents the ground state configuration of phosphorus,
#"P": ["Ne"] 3s^2 3p^3#
The second one represents the ground state configuration of potassium,
#"K": ["Ne"] 3s^2 3p^6 4s^1#
For the first 20 elements in the periodic table, any electron configuration that follows the lower energy orbitals first order of filling will be a ground state configuration - this is known as the Aufbau Principle.
In your case, an excited state for these two atoms could be
#"P": ["Ne"] 3s^1 3p^4#
Here, the 3s-orbital, which is lower in energy than the 3p-orbitals, is not completely filled before the filling of the higher energy 3p-orbitals starts.
This means that this electron configuration represents an excited state.
#"K": ["Ne"]: 3s^2 3p^5 4s^2#
This time, an electron from the 3p-orbitals is being promoted to the 4s-orbital. This too represents an excited state.