What is the principal quantum number (n) for the valence electrons in phosphorus?

$3$
$\left[N e\right] 3 {s}^{2} \setminus 3 {p}^{3}$
The outermost shell is the third shell, so here, $n = 3$.