J.R. S. answered 02/25/23
Ph.D. University Professor with 10+ years Tutoring Experience
Simply take the difference between the number of moles of gas on the product side and the reactant side of the equation.
(NH4)2CO3(s)⟶2NH3(g)+CO2(g)+H2O(g)
moles of gas on product side = 2 + 1 + 1 = 4
moles of gas on reactant side = 0
∆ngas = 4 - 0 =4 mol
H2(g)+Cl2(g)⟶2HCl(g)
moles of gas on product side = 2
moles of gas on reactant side = 1 + 1 = 2
Δ𝑛gas = 2 - 2 = 0 mol
You should be able to do the rest. And yes, it is possible to get a negative number which you will get in the next two examples.