On heating ammonium dichromate and barium azide separately we get
(NH4)2Cr2O7N2 + Cr2O3 + 4H2O
Ba(N3)2 3N2 + Ba
As in both the reactions nitrogen gas is released. Hence the correct option is (i).