The thermodynamic requirement for spontaneity of a reaction is that the reaction must have a negative value of Gibbs’ free energy (∆G°). According to the definition of free energy, ∆G° = ∆H° – T∆S° where the terms have their usual significance.
For the first reaction, ∆H° is negative, ∆S° is negative as there are lesser number of gaseous molecules in the product side, compared to the reactant side. In order to make ∆G° negative, the first term must surpass the second term. Or, ∆H° > T∆S°
Or, T < ∆H°/∆S°.
Similarly, for the second reaction, ∆H° is positive, ∆S° is also positive as there is greater number of gaseous molecules in the product side, compared to the reactant side. So, in order to make ∆G° negative, the second term must surpass the first term here. In other words,
∆H° < T∆S° or, T > ∆H°/∆S°. Hence the reactions will be spontaneous at temperatures at which the above two criteria are fulfilled.