Valency is the combining capacity of the atom. The atomic number of phosphorus is 15. So, the electronic configuration will be 2,8,5. To complete the outer orbit, the atom has to gain 3 electrons or lose 5 electrons. Therefore, phosphorus has both valency 3 and 5.