Expressing variable in terms of other independent variables. I am going through a proof for the existence of temperature (a proof written in C. J. Adkins equilibrium thermodynamics, if anyone is interested) and I am confused about one of the steps. I am hoping someone will be able to clarify it for me. 
Before anyone starts up: I would ask in physics but I think the bit I am stuck on is the maths trick being used and I do not want to confuse things even more.
Starting with the condition for equilibrium for 1 and 3.
$$F_1=(p_1,V_1,p_3,V_3)=0$$
Next the condition for equilibrium for 2 and 3.
$$F_2=(p_2,V_2,p_3,V_3)=0$$
Solving both for $p_3$ 
$$p_3=f_1(p_1,V_1,V_3)=0$$
$$p_3=f_2(p_2,V_2,V_3)=0$$
and equating the two:
$$p_3=f_1(p_1,V_1,V_3)=f_2(p_2,V_2,V_3)$$
Next is the bit I do not get because he solves for $p_1$
$$p_1=g(V_1,p_2,V_2,V_3)$$
What happened between $p_3$ and $p_1$? I have no idea what trick he did to get away with doing that. The bit afterwards is made vague if I just accept it without knowing why so I would be keen to get some ideas here because he then solves for $p_1$ like this
(the physics bit) 
and by the zeroth law this must be true:
$$F_3=(p_1,V_1,p_2,V_2)=0$$
Ok back to the maths: 
$$p_1=f_3(V_1,p_2,V_2)$$ 
Which apparently means $V_3$ can drop out of 
$$p_3=f_1(p_1,V_1,V_3)=f_2(p_2,V_2,V_3)$$
But it comes across like he did it and said "I did it so that proves I can do it". I do not know how he did it and it looks a bit like he is cheating without seeing that step!
$$p_3=f_1(p_1,V_1)=f_2(p_2,V_2)$$
Anyway I get the rest (provided the previous stuff was true) but I may as well finish it for the sake of completeness:
$$\Phi_1(p_1,V_1)=\Phi_2(p_2,V_2)$$
Which proves the existence of temperature. 
Adkins has clearly never had a thermostat war or he'd not have needed all that but anyway... I would really appreciate some explanations of the bit I am confused on. 
EDIT: 
Please observe the bit where I say the next is the bit I do not get because he solves for $p_1$
$$p_1=g(V_1,p_2,V_2,V_3)$$
EDIT:
The amazon look inside shows the proof which is in the first few pages under the zeroth law chapter 
 A: Well, I truly do not get the point what's wrong? I guess at first he expressed pressure, that is needed to reach equilibrium for the states 1 and 3 then he did the same for the state 2 and 3 and then said that with this pressure ($p_3$) states 1 and 3, and 2 and 3 will be in equilibrium simultaneously, so we can try to connect the parameter in those states. So he equated them: 
$f_1(p_1,V_1,V_3)=f_2(p_2,V_2,V_3)$ 
And equating them he excluded variable $p_3$.
I guess this is all about it.
A: By the equilibrium of 1 and 3; and 2 and 3 the first relation of $p_1$ is derived such as
$$p_1=g(V_1,p_2,V_2,V_3)$$
As next point transitivity is employed between systems. Because of transivity condition systems 1 and 2 are also in equilibrium and there exists a transitive closure (smallest transitive relation) which is given by below relation
$$F_3(p_1,V_1,p_2,V_2)=0$$
which can be solved for $p_1$
$$p_1=g(V_1,p_2,V_2)$$
In summary transivity closure is used to eliminate system 3 from the solution set which also eliminates $V_3$ from the relation.
-------Extension for derivation of $p_1$---------
The equilibrium condition between systems 1 and 3 is given by
$$F_1(p_1,V_1,p_3,V_3)=0$$
which can be solved explicitly to find $p_3$
$$p_3=f_1(p_1,V_1,V_3)$$
The equilibrium condition between systems 2 and 3 is given by
$$F_2(p_2,V_2,p_3,V_3)=0$$
which can be solved explicitly to find $p_3$
$$p_3=f_2(p_2,V_2,V_3)$$
Since bot definiton of $p_3$ is same and we can eliminate $p_3$ such as
$$p_3=f_1(p_1,V_1,V_3)=f_2(p_2,V_2,V_3)\Rightarrow G(p_1,p_2,V_1,V_2,V_3)=f_1(p_1,V_1,V_3)-f_2(p_2,V_2,V_3)=0$$
This equation can be solved explicitly for $p_1$
$$p_1=g(V_1,p_2,V_2,V_3)$$
A: The part in question looks to be the implicit function theorem (IFT) to me.  
If we define $f = f_1(p_1,V_1,V_3) - f_2(p_2,V_2,V_3)$, then $f$ is a map from $\mathbb{R}^{1+4} \to \mathbb{R}$.  
If you can show that $f$ satisfies the conditions of IFT (which I guess is the case... 
I don't have the book, so I don't know what conditions of $f_1,f_2$ are), you can just apply the theorem.  Let me know what you think.
