Find the greatest value of $P= \frac{2x^2}{1+x^2} -\frac{2y^2}{1+y^2}+\frac{3z^2}{1+z^2}$

You found $1+z^2=xy-yz−zx+z^2=(y-z)(x-z)$

Similarly for $1+x^2$ you get $(x-z)(x+y)$

And for $1+y^2$ you get $(y-z)(x+y)$

Therefore, you can replace:

\begin{align} P= \frac{2x^2}{1+x^2} -\frac{2y^2}{1+y^2}+\frac{3z^2}{1+z^2}\end{align}

with

\begin{align} P = \frac{2x^2}{(x-z)(x+y)} -\frac{2y^2}{(y-z)(x+y)}+\frac{3z^2}{(y-z)(x-z)}\end{align}

With a bit of manipulation of the numerator you can have $$\frac{2x^2}{(x-z)(x+y)} \to \frac{2(x^2 + 1) - 2}{(x-z)(x+y)} \to \frac{2((x-z)(x+y)) - 2}{(x-z)(x+y)} \to 2 - \frac{2}{(x-z)(x+y)}$$

$$\frac{2y^2}{(y-z)(x+y)} \to \frac{2(y^2 + 1) - 2}{(y-z)(x+y)} \to \frac{2((y-z)(x+y)) - 2}{(y-z)(x+y)} \to 2 - \frac{2}{(y-z)(x+y)}$$

$$\frac{3z^2}{(y-z)(x-z)} \to \frac{3(z^2 + 1) - 3}{(y-z)(x-z)} \to \frac{3((y-z)(x-z)) - 3}{(y-z)(x-z)} \to 3 - \frac{3}{(y-z)(x-z)}$$

See if you can continue from here... this question is a little bit tedious and its asking you to reduce the forms to a numerical value. Note that every time you run into a stall, replace any numerical value with $(xy-yz−zx)$ until its reduced to a simple numeric or obtain a identity. For example,

$2 - \frac{2}{(y-z)(x+y)} \to 2(xy-yz−zx) - \frac{2(xy-yz−zx)}{(y-z)(x+y)}$

This way you can try to reduce your chances of running into a stall (or avoid stalling and hopefully deduce a value).