Or else here's a more mathematical approach.
Any compound must have zero overall charge (fact)
So we take phosphorus's charge as x.
Then 2x + (5*-2) = 0
2x-10=0
X=+5
This is the way to find the oxidation state of an element in a compund
Any compound must have zero overall charge (fact)
So we take phosphorus's charge as x.
Then 2x + (5*-2) = 0
2x-10=0
X=+5
This is the way to find the oxidation state of an element in a compund
Phosphorus (V) which means that its oxidation state is +5.
We know for sure that oxygen has an oxidation state of -2.
Therefore using the basic valency rules we just swap the charges of the 2 elements and we get P2O5.
Hope you understand!