I tried proving the condition dG<=0 where G is Gibb's free energy and instead ended up proving dB<=0 where B is exergy. Can someone please explain what went wrong with my derivation. I have attached the photo of derivation below. Thank you.
Edit 1: I looked up on the net and it said exergy and Gibb's free energy are same at NPT ensemble. I cannot understand how when both the type of energies use different Temperatures in there formula. Can someone also give an explanation for this??