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?

In this answer I use Lagrange multipliers to find the critical points of the function within the region $x,y,z\geq0$, show that the only critical point is a minimum at $x=y=z=1$, and then argue it must achieve a maximum on the boundary and find that maximum.
Let $f=xy+yz+zx-xyz$ then $$\nabla f=(1-(y-1)(z-1),1-(z-1)(x-1),1-(x-1)(y-1))$$
Let $g=x+y+z-3$ then $\nabla g=(1,1,1)$ and set
$\nabla f-\lambda \nabla g=0$ then we have
$$
\begin{align}
(y-1)(z-1)&=1-\lambda\\
(x-1)(z-1)&=1-\lambda\\
(x-1)(y-1)&=1-\lambda\\
\end{align}
$$
Equating these easily gives us $x=y=z=1$.
By setting, say $x=\frac13, y=z=\frac43$, we get $f=56/27$, and we can see this is a minimum, and since there is no other critical point, the maximum value attained by $f$ must lie on the boundary.
Without loss of generality, set $x=0$ then $f=yz=(3-z)z$, which by symmetry attains a maximum at $z=3/2$. Set $x=y=0$ and $f\equiv 0$, so the maximum of $9/4$ is at $x=0, y=z=3/2$.
