Dear Chandan
the ions with one or two oxidation number(basic)u hav 2 memorise or know it!!!!
example:
Ba,Barium=+2
O,oxygen=-2
H,hydrogen=+1
the oxidation number of whole molecules=0
put the phophurus as X
+2+2(2(+1)+X+(2)-2)=0
2+4+2X-8=0
2X=8-4-2
=2
X=+1
the oxidation number is +1
Regards
Arun (askIITians forum expert)