To determine the ratio, we can look at the subscripts in the chemical formula. The subscript 2 after the P indicates that there are 2 atoms of phosphorus in the compound. The subscript 5 after the O indicates that there are 5 atoms of oxygen in the compound.
Therefore, the ratio of phosphorus to oxygen in P2O5 is 2:5.