Consider finding the integral surface of
$$x^2 p + xy q = xyz-2y^2$$
which passes through the line $x=y e^y$ in the $z=0$ plane.
Attempt
In Lagrange's subsidiary form $$\frac{dx}{x^2}=\frac{dy}{xy}=\frac{dz}{(xyz-2y^2)}$$ Firstly consider $$\frac{dx}{x^2}=\frac{dy}{xy}$$ One can trivially show that $$a = \frac{x}{y}$$ where $a$ is an arbitrary constant. Now, consider $$\frac{dx}{x^2}=\frac{dz}{(xyz-2y^2)}$$ which may be written as $$\frac{dz}{dx}=\frac{(xyz-2y^2)}{x^2} \equiv \frac{z}{a}-\frac{2}{a^2}$$ having used $a=x/y$ from before. (After this point I am unsure of my working...) $$\frac{dz}{dx}=\frac{az-2}{a^2} \implies\frac{dz}{(az-2)}=\frac{dx}{a^2}$$
As $a$ is a function of $a(x,y)$, albeit an arbitrary constant, is my solution above sensical or have a made a mistake?
I understand that to find the integral surface the general solution is of the form $F(a,b)$ where has so far been determined to be $a=x/y$. How can I find this over arbitrary constant $b$?
Carry out the second integration, $$ az-2=be^{x/a}=be^y. $$ Then use $b=\phi(a)$ or a similar dependence and insert the initial condition $$ -2 = \phi(e^y)e^{y}\implies \phi(t)=-\frac{2}t. $$