This answer to a question about unmixing gases states:
However, let us now assume we have to hand a source of mechanical work, and a large heat reservoir at temperature $T$. I'll assume that we'll use the work (somehow) to unmix the fluids, and that any excess heat that gets generated will be dumped in the heat reservoir.
In general the mixed and unmixed states of the fluid system will have different energies. I'll call the difference $\Delta H$, with positive $\Delta H$ meaning that the unmixed state has a higher energy than the mixed one. (I'm guessing that for real miscible fluids this is usually a small positive value, but it needn't necessarily be.)
We'll assume it takes us an amount $W$ of work to unmix the fluids. $W$ has been lost from the work source, and $\Delta H$ has been gained from the fluid system, so the first law says that the energy of the heat bath must increase by $W-\Delta H$.
We can now calculate the total change in entropy. The fluids' entropy has decreased by $\Delta S_\text{mixing}$, and the heat bath's entropy has increased by $(W - \Delta H)/T$, so the total is
$\Delta S_\text{total} = \frac{W - \Delta H}{T} - \Delta > S_\text{mixing} \ge 0,$
or
$W \ge T\Delta S_\text{mixing} + \Delta H.$
Changing this to an equality gives you the minimum amount of work required to unmix the fluids. But note that the expression involves $T$, which is the temperature of the heat bath that I assumed to exist. Without the heat bath there would be nowhere for the energy from the work source to go once it's used up.
Also note that $T$ is not necessarily the temperature of the mixed fluids, which could be different from that of the heat bath. I didn't need to make any assumptions about the fluids' temperature in order to work out the above. In practice you'd usually assume the fluids to be in contact with the heat bath, so that the two temperatures are in fact equal. In this case (and only in this case), the minimum work required is equal to the difference in Helmholtz free energy between the mixed and unmixed states.
Now what $is$ the temperature of my heat bath? I know that it should be indiepenent of the process used: We are looking at the pure change in entropy of the unmixing, this is path independent. But is it safe to assume it's the temperature of the gas? Before or after unmixing?