$$\color{red}(\exists \color{red}x~\forall y~ Lyx\color{red}) \land (\forall z~\exists y \lnot Lyz) \text{ s.t. } \color{red}x \ne z$$
Look at the red parts. The first $x$ is inside the parenthesis (quantified), the second is outside (unquantified). The second $x$, grammatically, refers to a different variable than the first due to how you wrote it.
(Btw ignore the complaints about s.t., it is well understood and fine to use if done grammatically correctly).
Here are some ways to transform the formula:
$$\exists x~\bigg( (\forall y ~ Lyx) \land (\forall z~\forall y ~Lyz \to z = x)\bigg)$$
First it would appear you'd like to use the contrapositive:
$$\exists x~\bigg( (\forall y ~ Lyx) \land (\forall z~\forall y ~ z \ne x \to \lnot Lyz )\bigg)$$
Since $x \ne z$ doesn't reference $y$, the $\forall y$ can be moved (this is a formula from the prenex technique):
$$\exists x~\bigg( (\forall y ~ Lyx) \land (\forall z~z \ne x \to \forall y ~ \lnot Lyz )\bigg)$$
One thing you can also notice is that you have a formula of the form $\forall a Pa \land \forall b Qb$, which can be written $\forall c Pc \land Qc$ :
$$\exists x~\bigg( (\forall w ~ Lwx) \land (\forall w~w \ne x \to \forall y ~ \lnot Lyw )\bigg)$$
$$\exists x~\bigg( \forall w ~ (Lwx \land (w \ne x \to \forall y ~ \lnot Lyw ))\bigg)$$
There's other manipulations you can do, but more big picture, there are a lot of ways to write "the predicate $P$ is inhabited exactly once". One way attributed to Dijkstra is as $\exists x (\forall y~P(y) \text{ iff } x = y)$, which in your case becomes:
$$\exists x (\forall y~(\forall z ~ Lzy) \text{ iff } y = x)$$