Chemical reaction proceeds in the direction of increasing entropy
If the system is not adiabatic, we have to invoke Gibbs free energy, G
From 1st Law,
From 2nd Law, of Thermodynamic