Inequality $xy+yz+zx-xyz \leq \frac{9}{4}.$ Currently I try to tackle some olympiad questions:

Let $x, y, z \geq 0$ with $x+y+z=3$. Show that
$$
x y+y z+z x-x y z \leq \frac{9}{4}.
$$
and also find out when the equality holds.


I started by plugging in $z=3-x-y$ on the LHS and got
$$
3y-y^2+3x-x^2-4xy+x^2y+xy^2 = 3y-(y^2+x^2)+3x-4xy+x^2y+xy^2\leq 3y-((y+x)^2)+3x-4xy+x^2y+xy^2
$$
But this got me nowhere.
Then I started again with the left hand side
$$
x y+y z+z x-x y z \Leftrightarrow yz(1-x)+xy+zx
$$
and $x+y+z=3 \Leftrightarrow y+z-2=1-x$ so
$$
yz(y+z-2)+x(y+z)
$$
But this also leaves no idea. Do I have to use a known inequality?

This is equivalent to $$(1-x)(1-y)(1-z)\leq \frac14.\tag 1$$
This is true if any $x,y,z$ is exactly one, since the the left side of $(1)$ is zero.
It is not possible for all $x,y,z$ to be greater than $1,$ nor for all $x,y,z$ to be less than $1,$ since $x+y+z=3.$
If only one of the values is $>1,$ then the left side of $(1)$ is negative, so it is true, again.
So we are left with $x=1+a,y=1+b,z=1-(a+b)$ where $a,b>0$ and $a+b\leq 1.$
Then the left side of $(1)$ is $ab(a+b).$ If $a+b<1,$ we can always increase this value by using $a'=\frac{a}{a+b},b'=\frac{b}{a+b}.$ So the maximum value is when $a+b=1.$
That means, substituting $b=1-a,$ we want to maximize $a(1-a)$ for $0<a<1.$ That is easy to do with calculus, with a maximum at $a=\frac12$ for a value of $\frac14.$
So the maximum of your expression occurs when $(x,y,z)=\left(\frac32,\frac 32,0\right).$
