Problem
Solve the initial value problem in the domain $x<0$: $$ xyz_x + x^2z_y = x^2+y^2-yz $$
where $z=x$ on the line $y=1$.
Attempt
Edit: As JJacquelin pointed out in the answers, my first integral $u_2$ is incorrect which would explain the problem. It should be $x(y-z)$.
I solved for two functionally independent first integrals $u_1(x,y):=x^2-y^2+1$ and $u_2(x,y,z):=\dfrac{y-z}{x}$ of the vector field $V(x,y,z)=(xy,x^2,x^2+y^2-yz)$. We can parameterize the initial curve as follows: $x=t, y=1, z=t$ where $t<0$.
Evaluating $u_1$ and $u_2$ on the initial curve, we get
$$ \begin{align} &U_1 = t^2\\ &U_2 = \dfrac{1-t}{t} \end{align} $$
Here is where I have some confusion. I know we need to eliminate $t$, but there seems to be a subtlety about how to go about it. I am tempted to write $t=\pm\sqrt{U_1}$ so that $U_2=\dfrac{1\mp\sqrt{U_1}}{\pm\sqrt{U_1}}$. Then, we can write
$$ \dfrac{y-z}{x}=\dfrac{1\mp\sqrt{x^2-y^2+1}}{\pm\sqrt{x^2-y^2+1}} $$
When $y=1$, we must have $x=z$, so this determines the choice of signs above as:
$$ \dfrac{y-z}{x}=\dfrac{1-\sqrt{x^2-y^2+1}}{\sqrt{x^2-y^2+1}} $$
Solving for $z$, we then have
$$ z=x+y-\dfrac{x}{\sqrt{x^2-y^2+1}}. $$
But when I plug this back into the PDE, it fails to satisfy the equation. My suspicion for what went wrong is how I eliminated $t$. Certainly, I can also get rid of $t$ by writing $U_1U_2^2=(1\pm\sqrt{U_1})^2$. If we follow the same procedure, we get a more complicated formula for $z$ with more terms. What is the correct way to proceed, and where did I go wrong in my attempt?
This is not a direct answer to your question because I am not quite certain of your first integrals $u_1$ and $u_2$. You should edit the detailed calculus so that one could check it. I think that might be $u_2=x(y-z)$ instead of $\frac{y-z}{x}$ .
Nevertheless I hope that the comparison with the characteristic equations below would help to clarify. $$xyz_x+x^2z_y=x^2+y^2-yz$$
The Charpit-Lagrange system of characteristic ODEs is : $$\frac{dx}{xy}=\frac{dy}{x^2}=\frac{dz}{x^2+y^2-yz}$$ A first characteristic equation comes from $\frac{dx}{xy}=\frac{dy}{x^2}$ which solving leads to : $$x^2-y^2=c_1$$ A second characteristic equation comes from $\frac{dy}{x^2}=\frac{dz}{x^2+y^2-yz}$ which solving leads to :
$\frac{dy}{c_1+y^2}=\frac{dz}{(c_1+y^2)+y^2-yz}\quad\implies\quad\frac{dz}{dy} =\frac{c_1+2y^2-yz}{c_1+y^2}$ which is a linear first order ODE easy to solve.
$$(z-y)\sqrt{c_1+y^2}=c_2$$ $$(z-y)x=c_2$$ The general solution of the PDE expessed on the form of implicite equation $c_2=F(c_1)$ is : $$(z-y)x=F(x^2-y^2)$$ with arbitrary function $F$, to be determined later according to the specified condition. $$\boxed{z(x,y)=y+\frac{1}{x}F(x^2-y^2)}$$ Condition : $$z(x,1)=x=1+\frac{1}{x}F(x^2-1)\quad\implies\quad F(x^2-1)=x^2-x$$ Let $X=x^2-1\quad;\quad x=\pm\sqrt{X+1}$ $$F(X)=X+1\pm\sqrt{X+1}$$ The function $F$ is determined. We put it into the above general solution where $X=x^2-y^2$.
$$z(x,y)=y+\frac{1}{x}\left(x^2-y^2+1\pm\sqrt{x^2-y^2+1} \right) $$ The sign is determined so that $z(x,1)=x$
$$\boxed{z(x,y)=\begin{cases} x+y+\frac{1}{x}\left(1-y^2-\sqrt{x^2-y^2+1} \right) \quad\text{if }x>0 \\ x+y+\frac{1}{x}\left(1-y^2+\sqrt{x^2-y^2+1} \right) \quad\text{if }x<0 \end{cases}}$$