(N/A) Gibbs energy $(G)$ is an extensive property defined as $G = H - TS$.
The change in Gibbs energy for a system at constant temperature $(\Delta T = 0)$ is given by the Gibbs equation:
$\Delta G = \Delta H - T \Delta S$
Here,$\Delta H$ and $T \Delta S$ are energy terms,so $\Delta G$ has units of energy.
For a system in thermal equilibrium with its surroundings,the temperature of the system equals the temperature of the surroundings. The heat lost by the system is gained by the surroundings,so $\Delta H_{\text{surr}} = -\Delta H_{\text{sys}}$.
The total entropy change is $\Delta S_{\text{total}} = \Delta S_{\text{sys}} + \Delta S_{\text{surr}} = \Delta S_{\text{sys}} - \frac{\Delta H_{\text{sys}}}{T}$.
Multiplying by $-T$,we get $-T \Delta S_{\text{total}} = \Delta H_{\text{sys}} - T \Delta S_{\text{sys}} = \Delta G_{\text{sys}}$.
Criteria for spontaneity:
$1$. If $\Delta G < 0$,the process is spontaneous.
$2$. If $\Delta G > 0$,the process is non-spontaneous.
$3$. If $\Delta G = 0$,the system is at equilibrium.