konichiwa2 ,you did it correctly.
Contrary to Borek, I think oxidation numbers problem in organic chemistry is a quite simple one.
You can calculate a mean oxidation number for for a specific kind of atoms in a molecule, or oxidation numbers for each atom.
For sepatate atoms:
CH3 ON for C is -3 [x+3=0]
COOH ON for C is +3 [x-2(2)+1=0]
And mean is (-3+3)/2=0
C-C bonds do not contribute to ON in this method. Why?
Other example
CH3-CH2-COOH ON(for C) [ 3x+6-4=0] => x=-2/3
For separate atoms: -3 -2 and +3 respectively for C1, C2 and C3 (from the left)
mean from above numbers is (-3-2+3)/3=-2/3
Try to count oxidation numbers for all atoms in CH3OOH (peroxide)
Use separate atom method
Just for checking)
(C-2, H+1, O-1)