I've read a solution of a problem, in which there are two different gases in a container, initally at equilibrium and separated by an adiabatic fix wall. At some time, this wall is changed by a diathermic mobile wall, so the equilibrium point changes. You have to find the final state of the gases, given the initial volumes, temperatures and pressions. Then the solution says: we will divide the process in two parts: first an isochoric process and after that and isothermal one. But it is clear that pressure and temperature evolve at the same time. I'm making a bit of a mess here: is it path dependent or indpendent? In a generic process, when is it path independent and when it is not? And why?