If an atom described by spin-orbit coupling is in a 4P state, why is the spin quantum number s=3/2?
I guess you mean 4P. How is a term symbol built up?
That's the terminology in the question yes. I don't quite understand what 4P means though? What do you mean by term symbol?
The description of the angular momentum of a state is called a term symbol. In Russell-Saunders (LS) coupling, it has the form 2S+1LJ. In your particular case, the value of J has been omitted.
So the angular momentum quantum number is l=1 as it's a P state? How is the value of s determined?
The exponent is 2S+1, so for a quadruplet, 2S+1 = 4 means S=3/2.
Sorry I've never seen this notation before so I wasn't aware of the relationship. So why do we have L=P then?
It's a legacy from the earlier days of atomic physics. It follows the same nomenclature as orbitals: s, p, d, f, etc., but with uppercase letters (just as the total orbital angular momentum is L, instead of l for the orbital angular momentum of a single electron).
Separate names with a comma.