Phosphorus(Atomic no. 15) has its electrons arranged in a configuration of 2,8,5. Now, orbits are stable when they are full. In this case, The outer orbit must have eight electrons for stability in combining with other elements, also known as valency. So one can either add 3 electrons to the outer orbit or take away 5 electrons with equal ease. So Phosphorus has a valency of 3 or 5.