In this case, both equations are equivalent. For a general case, you would use the equation:

ΔH = ΔU + Δ(PV)

In the case of a reaction occuring at fixed temperature and pressure plus the assumptions that all gasses are ideal and solids + liquids have negligible volume, you get

Δ(PV) = P(ΔV) = P Δ(nRT/P) = P (RT/P)Δn = RT(Δn)

so

ΔH = ΔU + RT(Δn)

To find Δn, the change in the number of moles of gas, you need to write out the balanced chemical reaction.