Answer
(a) 0
(b) -0.5
(c) -1
(d) +2
Work Step by Step
(a) Oxygen is a free element. Therefore it has an oxidation state of 0.
(b) Potassium is an alkali metal, so it always has an oxidation state of +1. The net charge of the compound is 0. The +1 charge is balanced by two oxygen atoms each with -0.5 charge.
(c) Sodium is an alkali metal, so it always has an oxidation state of +1. The net charge of the compound is 0. Two sodium atoms result in a charge of 2(1)=2, balanced by two oxygen atoms, each with -1 charge.
(d) Fluorine always has an oxidation state of -1. The net charge of the compound is 0. Two fluorine atoms result in a charge of 2(-1)=-2. This charge is balanced by a single oxygen atom, which has +2 charge.