Answer: The oxygen atoms are SP2 hybridized while the carbon atoms are SP hybridized.
Step-by-step explanation:
C- 1s2 2s2 2p2
O- 1s2 2s2 2p4
In the formation of CO2, double bonds are formed from carbon to each oxygen atom. This leaves the two lone pairs on each oxygen atom. Hence carbon is sp hybridized while oxygen is sp2 hybridized. The sp hybridization of carbon accounts for the four electrons which it shares with oxygen on either side in the CO2 molecule.