Answer
The minimum value of $f\left( {x,y,z} \right) = x - z$ is $ - \sqrt 2 $ and the maximum value is $\sqrt 2 $ on the intersection of the cylinders ${x^2} + {y^2} = 1$ and ${x^2} + {z^2} = 1$.
Work Step by Step
Our task is to find the extreme values of the function $f\left( {x,y,z} \right) = x - z$ subject to the two constraints $g\left( {x,y,z} \right) = {x^2} + {y^2} - 1 = 0$ and $h\left( {x,y,z} \right) = {x^2} + {z^2} - 1 = 0$.
The Lagrange condition is
$\nabla f = \lambda \nabla g + \mu \nabla h$
$\left( {1,0, - 1} \right) = \lambda \left( {2x,2y,0} \right) + \mu \left( {2x,0,2z} \right)$
From the Lagrange condition we obtain three equations:
(1) ${\ \ \ \ }$ $1 = 2\lambda x + 2\mu x$, ${\ \ }$ $0 = 2\lambda y$, ${\ \ }$ $ - 1 = 2\mu z$
The third equation of (1) implies that $\mu \ne 0$ and $z \ne 0$. So, $\mu = - \frac{1}{{2z}}$.
The second equation of (1) yields the following cases:
Case 1. $\lambda = 0$
Substituting $\lambda = 0$ in the first equation of (1) gives
$1 = 2\mu x$
So, $\mu = \frac{1}{{2x}}$.
Using our previous results we get $\mu = \frac{1}{{2x}} = - \frac{1}{{2z}}$. So, $z=-x$.
Substituting $z=-x$ in the constraint $h\left( {x,y,z} \right) = {x^2} + {z^2} - 1 = 0$ gives
$2{x^2} = 1$
So, $x = \pm \frac{1}{{\sqrt 2 }}$.
Substituting $x = \pm \frac{1}{{\sqrt 2 }}$ in the constraint $g\left( {x,y,z} \right) = {x^2} + {y^2} - 1 = 0$ gives
$\frac{1}{2} + {y^2} - 1 = 0$
So, $y = \pm \frac{1}{{\sqrt 2 }}$.
Using $z=-x$, the critical points are $\left( {\frac{1}{{\sqrt 2 }},\frac{1}{{\sqrt 2 }}, - \frac{1}{{\sqrt 2 }}} \right)$, $\left( {\frac{1}{{\sqrt 2 }}, - \frac{1}{{\sqrt 2 }}, - \frac{1}{{\sqrt 2 }}} \right)$, $\left( { - \frac{1}{{\sqrt 2 }},\frac{1}{{\sqrt 2 }},\frac{1}{{\sqrt 2 }}} \right)$, $\left( { - \frac{1}{{\sqrt 2 }}, - \frac{1}{{\sqrt 2 }},\frac{1}{{\sqrt 2 }}} \right)$.
Case 2. $y=0$
Substituting $y=0$ in the constraint $g\left( {x,y,z} \right) = {x^2} + {y^2} - 1 = 0$ gives ${x^2} = 1$.
So, $x = \pm 1$.
Substituting $x = \pm 1$ in the constraint $h\left( {x,y,z} \right) = {x^2} + {z^2} - 1 = 0$ gives $z=0$.
So, the critical points are $\left( {1,0,0} \right)$ and $\left( { - 1,0,0} \right)$.
The extreme values corresponds to these critical points are listed in the following table
$\begin{array}{*{20}{c}}
{{\rm{Critical{\ }point}}}&{f\left( {x,y,z} \right)}\\
{\left( {\frac{1}{{\sqrt 2 }},\frac{1}{{\sqrt 2 }}, - \frac{1}{{\sqrt 2 }}} \right)}&{\sqrt 2 }\\
{\left( {\frac{1}{{\sqrt 2 }}, - \frac{1}{{\sqrt 2 }}, - \frac{1}{{\sqrt 2 }}} \right)}&{\sqrt 2 }\\
{\left( { - \frac{1}{{\sqrt 2 }},\frac{1}{{\sqrt 2 }},\frac{1}{{\sqrt 2 }}} \right)}&{ - \sqrt 2 }\\
{\left( { - \frac{1}{{\sqrt 2 }}, - \frac{1}{{\sqrt 2 }},\frac{1}{{\sqrt 2 }}} \right)}&{ - \sqrt 2 }\\
{\left( {1,0,0} \right)}&1\\
{\left( { - 1,0,0} \right)}&{ - 1}
\end{array}$
From these results we conclude that the minimum value of $f\left( {x,y,z} \right) = x - z$ is $ - \sqrt 2 $ and the maximum value is $\sqrt 2 $ on the intersection of the cylinders ${x^2} + {y^2} = 1$ and ${x^2} + {z^2} = 1$.