Sulphur burns in oxygen according to the following equation
$\underset{32 g}{ S }+ O _{2} \longrightarrow SO _{2}+\Delta H_{f}$
$0.5\, g$ S liberate $=4.6 \,kJ$ heat
$1\, g \,S$ liberate $=\frac{4.6}{0.5} kJ$
$32\, g \,S$ will liberate $=\frac{4.6}{0.5} \times 32$
$=294.4 \,kJ$
Heat of formation is the amount of heat liberated or absorbed when one mole of compound is formed from its constituent elements hence,
Heat of formation of $SO _{2}=-294.4\, kJ$