Proving a relation for fugacity of component i in term of independent variables (T,V)
I haven't been able to work out all the details of the mathematics yet, but the derivation of this equation must start out from the following equation:  

$$nRT\mathrm{d}\ln{\phi} = (V - V^{ig})\mathrm{d}P,$$

where $\phi$ is the fugacity coefficient of the mixture, $n$ is the total moles of the mixture, $V$ is the volume of the mixture $znRT/P$ and $V^{ig}$ is the volume of the mixture under ideal gas conditions: $nRT/P$.  Once the equation is integrated to get $RTn\ln{\phi}$, we get the fugacity of the $i$th component of the mixture by evaluating the following partial derivative:

$$RT\ln{\phi_i} = RT\frac{\partial (n\ln{\phi})}{\partial n_i}$$ 

Hope that this helps a little.

ADDENEUM

If we write, $$d(nV)=\left(\frac{\partial (nV)}{\partial n_i}\right)_{p,n_k}dn_i+\left(\frac{\partial (nV)}{\partial p}\right)_{ni,n_k}dp$$

then it follows that:  $$\left(\frac{\partial (nV)}{\partial n_i}\right)_{p,n_k}=-\left(\frac{\partial (nV)}{\partial p}\right)_{ni,n_k,V}\left(\frac{\partial (p)}{\partial n_i}\right)_{n_k,V}$$

The rest is easy.  The subscript $n_i$ in the OP equation is a typo.  It should be $n_k$, representing all other species being held constant.