The letter (P or D in the examples) indicates the total orbital angular momentum quantum number, L.
The left superscript in the term symbol (the 2 in P^2) gives the multiplicity of the term.
The right subscript on the term symbol (the 3/2 in P_3/2) is the value of the total angular momentum quantum number, J.