Consider the equation:
$$x \mathrm{e}^{\frac1{2} ((x-z)^2 - x^2)} + y(x - z) = 0$$
And limiting $z > 0$ and $y \ge 1$, for what values of $z$ and $y$ does the function in $x$ have exactly 2 real solutions? Looking for a function $z(y)$, but I can work with any implicit closed form or even approximate solution, as I've spent some time playing around with it, and I do not believe that there is an explicit closed form solution to this problem.
Motivation: Consider two normally distributed random variables $\mathcal{N}(0, 1)$ and $\mathcal{N}(z, 1)$ which are drawn from with probabilities $\frac{1}{y+1}$ and $\frac{y}{y+1}$. The function $z(y)$ are the $z$ are exactly the critical value for the separation of the two modes. For values of $z$ less than $z(y)$ there are not two separate modes, for values greater than this there are.
A few known values of this function are $z(1) = 2$, and $z(2) \approx 2.627509131962$.
From @OmnipotentEntity’s answer, let $x_0^2=e^w\implies z=\frac1{x_0}+x_0=2\cosh(\frac w2)$
$$y=x_0^2\exp\left(\frac{1}{2}\left(\frac{1}{x_0^2}-x_0^2\right)\right)=e^{\sinh(w)-w}$$
This post inverts $\sinh(x)+ax$ via an inverse Laplace transform; define its inverse as $f_a(x)$. Thus, $z(y)=2\cosh(\frac12f_{-1}(\ln(y))$:
$$\boxed{y(z) = \frac{\sqrt{z^4-4 z^2+2 \sqrt{z^2-4} z-\sqrt{z^2-4} z^3+2}}{ \sqrt{2 e^{-z \sqrt{z^2-4}}}}\implies z(y)=2\cos\left(\frac14\int_{c-i\infty}^{c+i\infty}\frac{y^s}s\operatorname A_{-s}(s)ds\right)}$$
shown here:
is $z(2)$ which matches the question. $\operatorname A_v(z)$ is the associated Anger Weber function. Perhaps this explicit expression will help.