Here the different equations that form part of the process:
$W=Pf(N)$
$W=P^eg(N)$
$Y=Y(N)$
$Y'=f(N)$
$z = \left( \array{dN \\ dP\\ dP^e} \right)$
$dP^e=\gamma dP$
Here is the whole process:
$Pf(N)=P^eg(N)$
$\nabla \phi(N,P,P^e) = \left( \array{Pf'(N) - P^e g'(N)\\ f(N)\\ -g(N)} \right)$
$\nabla \phi(N,P,P^e) \cdot z = Pf'(N)-P^eg'(N))dN+f(N)dP-g(N)dP^e$
$\nabla \phi(N,P,P^e) \cdot z = (Pf'(N)-P^eg'(N))dN+f(N)dP-g(N)dP^e$
$Pf'dN+f(N)dP=P^eg'dN+g(N)dP^e$
$Pf'dN+f(N)dP=P^eg'dN+g(N)\gamma dP$
$f(N)dP-g(N) \gamma dP=P^e g'dN-Pf'dN$
In Equilibrium $f(N)=g(N)$, therefore:
$(1- \gamma)f(N)dP=(P^eg'-Pf')dN$
$dN=\frac {f(N)(1-\gamma)}{(p^eg'-Pf')}dP$
This exercise keeps going but at this point now I have a $g'$ and a $f'$ that looks that are treated as variables, but I for some reason can't interpret f or g prime is right afterward I don't have $(N)$.
$f$ is a function.
$f'$ means the derivative of $f$, which is also a function.
$f(x)$ means $f$ evaluated at $x$.
$f'(x)$ means $f'$ evaluated at $x$.