According to the chemical equation

4KO2(s) + 2CO2(g) ---> 2K2CO3(s) + 3O2(g)

b) how many molecules of dioxygen are produced when eight formula units of KO2 react?

Answer

According to the balanced chemical equation when four formula units of potassium superoxide react (assuming excess carbon dioxide) three molecules of dioxygen form. Potassium superoxide and dioxygen always combine in this ratio according to this equation. We can use this relationship as a unit conversion factor to convert between potassium superoxide and dioxygen.

This conversion between potassium superoxide and dioxygen tells us the six molecule of dioxygen are formed when eight formula units of potassium superoxide react.