Photochemical smog is a brownish-grey haze. It is caused by the action of solar ultraviolet radiation on an atmosphere polluted with hydrocarbons and oxide of nitrogen.
Sunlight causes the decomposition of NO2 into 𝑁𝑂 and nascent oxygen.
NO2hv→NO+[O]
𝐴𝑡𝑜𝑚𝑖𝑐 𝑜𝑥𝑦𝑔𝑒𝑛 (𝐻𝑖𝑔ℎ𝑙𝑦 𝑟𝑒𝑎𝑐𝑡𝑖𝑣𝑒 𝑠𝑝𝑒𝑐𝑖𝑒𝑠)
When atomic oxygen combines with an oxygen molecule, it forms ozone.
O2+[O]→O3
Hence, this ozone (O3) is formed during the formation of smog.