(N/A) Consider two gases $A$ and $B$ occupying two different containers. The pressure and volume of a given mass of gas can be chosen as its two independent variables.
Suppose the pressure and volume of gases $A$ and $B$ are $(P_{A}, V_{A})$ and $(P_{B}, V_{B})$ respectively.
First,the two systems are placed in proximity but are separated by an adiabatic wall,which does not allow the flow of heat energy from one to another. This is shown in figure $(a)$.
Now,suppose the adiabatic wall separating the gases $A$ and $B$ is replaced by a diathermic wall (conducting wall),which allows heat energy to flow from one gas to another. This is shown in figure $(b)$.
It is observed that the macroscopic variables of systems $A$ and $B$ change spontaneously until both systems attain equilibrium states. After this,there is no further change in their states.
The pressure and volume variables of the two gases change to $(P_{A}^{\prime}, V_{A}^{\prime})$ and $(P_{B}^{\prime}, V_{B}^{\prime})$ such that the new states of $A$ and $B$ are in equilibrium with each other. There is no more net energy flow from one to another. This state is called thermal equilibrium.
In thermal equilibrium,the temperatures of the two systems are equal.