Solution:
H4P2O7
Let expect oxidation number of P is x.
\[\begin{array}{*{35}{l}}
Oxidation\text{ }number\text{ }of\text{ }H\text{ }=\text{ }+1 \\
~ \\
Oxidation\text{ }number\text{ }of\text{ }O\text{ }=\text{ }-\text{ }2 \\
\end{array}\]
Then, at that point, we have:
\[\begin{array}{*{35}{l}}
4\left( +1 \right)\text{ }+\text{ }2\left( x \right)\text{ }+\text{ }7\text{ }\left( -\text{ }2 \right)\text{ }=\text{ }0 \\
~ \\
=\text{ }4\text{ }+\text{ }2x\text{ }-\text{ }14\text{ }=\text{ }0 \\
~ \\
=\text{ }2x\text{ }-\text{ }10\text{ }=\text{ }0 \\
~ \\
=\text{ }2x\text{ }=\text{ }+10 \\
~ \\
=\text{ }x\text{ }=\text{ }+5 \\
\end{array}\]
Subsequently, Oxidation number of P is +5