mercuric oxide on heating gives mercury and oxygen
Mercury oxide when heated in air will decompose to give elemental mercury, a liquid metal, and oxygen gas. But you really should have specified whether it is mercury (II) oxide or mercury (I) oxide.
The balanced equation for mercury (II) oxide:
2HgO + heat ---> 2Hg + O2
Adding state symbols,
2HgO (s) + heat ---> 2Hg (l) + O2 (g)
The balanced equation for mercury (I) oxide:
2 (Hg2O) + heat ---> 4Hg + O2
Adding state symbols:
2(Hg2O) (s) + heat ---> 4Hg (l) + O2 (g)
The balanced equation for mercury (II) oxide:
2HgO + heat ---> 2Hg + O2
Adding state symbols,
2HgO (s) + heat ---> 2Hg (l) + O2 (g)
The balanced equation for mercury (I) oxide:
2 (Hg2O) + heat ---> 4Hg + O2
Adding state symbols:
2(Hg2O) (s) + heat ---> 4Hg (l) + O2 (g)