So, you want to find the minimum distance between two curves in the most general form using calculus and optimization.
The curves you are interested at this particular example are:
\begin{equation}
xy=1 ~~and~~ y=-x
\tag{01}
\end{equation}
The very first step is to write them in parametric form. i.e,
\begin{equation}
xy=1 \Rightarrow
\begin{cases}
x_1 &=t \\
y_1 &=\frac{1}{t}
\end{cases}
\tag{02}
\end{equation}
Similarly,
\begin{equation}
y=-x \Rightarrow
\begin{cases}
x_2 &=s \\
y_2 &=-s
\end{cases}
\tag{03}
\end{equation}
where $t$ and $s$ are the parameter. You can define their range based on the domain of defination of the curves. e.g, for first curve $t$ can take any value $(-\infty,\infty)$ except 0.
Now our objective is to find the pair of $(t,s)$ for which the distance is minimum. Let's define the distance between any two points located on these two curves as $D_{12}$. i.e,
\begin{eqnarray}
D_{12}^2 &=(x_1-x_2)^2+(y_1-y_2)^2 \\
&=(t-s)^2+(\frac{1}{t}+s)^2
\tag{06}
\end{eqnarray}
We need to find the $(t,s)$ corresponding to the minimum value of the objective function $D_{12}^2$. Note that, since $D_{12}$ is a positive scalar-valued function, hence minimizer of $D_{12}$ will also be a minimizer of $D_{12}^2$.
For extremum value of the objective function,
\begin{align}
&\frac{d}{dt}{D_{12}^2} =0 \\
&\Rightarrow 2(t-s)+2(\frac{1}{t}+s)(-t^2)=0 \\
&\Rightarrow (t-s)-\frac{1}{t^2}(\frac{1}{t}+s)=0 \tag{09}\\
&\frac{d}{ds}{D_{12}^2} =0 \\
&\Rightarrow 2(t-s)(-1)+2(\frac{1}{t}+s)=0 \\
&\Rightarrow (t-s)=(\frac{1}{t}+s) \tag{10}
\end{align}
Solve those two equations in a smart way. Substitute the second equation(\ref{10}) in the first one(\ref{09}) (sorry! equation \label-ing is not working). You will get,
\begin{align}
& (\frac{1}{t}+s)-\frac{1}{t^2}(\frac{1}{t}+s)=0 \\
& (1-\frac{1}{t^2})(t-s)=0
\end{align}
Hence, either $(1-\frac{1}{t^2})=0$ or $(t-s)=0$.
Now, $(t-s)=0$ is not possible. Because if you substitute this to the second equation(\ref{10}) you will end up having ${1+s^2}=0$. Which is not possible as $s$ is a real valued parameter.
Then, only option left is,
\begin{eqnarray}
(1-\frac{1}{t^2})=0 \\
t = \pm 1
\end{eqnarray}
Substitute $t=1$ in second equation to get $s=0$. Similarly $t=-1$ will give $s=0$.
The closest point on parametric form are $(t_1=1,s_1=0)$ and $(t_2=-1,s_2=0)$.
The corresponding pints on curves in cartesian co-ordinate are $[(1,1),(0,0)]$ and $[(-1,-1),(0,0)]$ on respective curves. The minimum distance is $\sqrt(2)$. See the image below:

See, even though you missed one solution, mathematics guided us to both the solutions.
To generalize this by stating that 'at minimum distance the slope is parallel', this might work for 2D but not in higher dimensions or between a curve and surface. Think of a 3D line and a parabola when both are not in the same plane. The concept of 'slope' is very vague when you go dimensions higher than 2D.