Phosphorus is in group 15 meaning it have 5 valence electrons. This means that it needs 3 more electrons to create a full outer shell. As these three electrons are negatively charged it means that P is a 3- ion (it’s an anion [negatively charged ion])