Before we get to the example itself, here is why the above approach works. Assume that a local minimum occurs at \((a,b,c)\text{,}\) which is the grey point in the schematic figure below. Imagine that you start walking away from \((a,b,c)\) along the curve \(g=h=0\text{.}\) Your path is the grey line in the schematic figure below.
Call your velocity vector \(\vv\text{.}\) It is tangent to the curve \(g(x,y,z)=h(x,y,z)=0\text{.}\) Because \(f\) has a local minimum at \((a,b,c)\text{,}\) \(f\) must be increasing (or constant) as we leave \((a,b,c)\text{.}\) So the directional derivative
\begin{equation*}
D_{\vv}f(a,b,c)=\vnabla f(a,b,c) \cdot \vv\ge 0
\end{equation*}
Now start over. Again walk away from \((a,b,c)\) along the curve \(g=h=0\text{,}\) but this time moving in the opposite direction, with velocity vector \(-\vv\text{.}\) Again \(f\) must be increasing (or constant) as we leave \((a,b,c)\text{,}\) so the directional derivative
\begin{equation*}
D_{-\vv}f(a,b,c)=\vnabla f(a,b,c) \cdot (-\vv)\ge 0
\end{equation*}
As both \(\vnabla f(a,b,c) \cdot \vv\) and \(-\vnabla f(a,b,c) \cdot \vv\) are at least zero, we now have that
\begin{equation*}
\vnabla f(a,b,c) \cdot \vv=0
\tag{$*$}
\end{equation*}
for all vectors \(\vv\) that are tangent to the curve \(g=h=0\) at \((a,b,c)\text{.}\) Let’s denote by \(\cT\) the set of all vectors \(\vv\) that are tangent to the curve \(g=h=0\) at \((a,b,c)\) and let’s denote by \(\cT^\perp\) the set of all vectors that are perpendicular to all vectors in \(\cT\text{.}\) So \((*)\) says that \(\vnabla f(a,b,c)\) must in \(\cT^\perp\text{.}\)
We now find all vectors in \(\cT^\perp\text{.}\) We can easily guess two such vectors. Since the curve \(g=h=0\) lies inside the surface \(g=0\) and \(\vnabla g(a,b,c)\) is normal to \(g=0\) at \((a,b,c)\text{,}\) we have
\begin{equation*}
\vnabla g(a,b,c) \cdot \vv=0
\tag{E1}
\end{equation*}
Similarly, since the curve \(g=h=0\) lies inside the surface \(h=0\) and \(\vnabla h(a,b,c)\) is normal to \(h=0\) at \((a,b,c)\text{,}\) we have
\begin{equation*}
\vnabla h(a,b,c) \cdot \vv=0
\tag{E2}
\end{equation*}
Picking any two constants \(\la\) and \(\mu\text{,}\) multiplying (E1) by \(\la\text{,}\) multiplying (E2) by \(\mu\) and adding gives that
\begin{equation*}
\big(\la\vnabla g(a,b,c)
+\mu\vnabla h(a,b,c)\big) \cdot \vv=0
\end{equation*}
for all vectors \(\vv\) in \(\cT\text{.}\) Thus, for all \(\la\) and \(\mu\text{,}\) the vector \(\la\vnabla g(a,b,c)+\mu\vnabla h(a,b,c)\) is in \(\cT^\perp\text{.}\)
Now the vectors in \(\cT\) form a line. (They are all tangent to the same curve at the same point.) So, \(\cT^\perp\text{,}\) the set of all vectors perpendicular to \(\cT\text{,}\) forms a plane. As \(\la\) and \(\mu\) run over all real numbers, the vectors \(\la\vnabla g(a,b,c)
+\mu\vnabla h(a,b,c)\) form a plane. Thus we have found all vector in \(\cT^\perp\) and we conclude that \(\vnabla f(a,b,c)\) must be of the form \(\la\vnabla g(a,b,c)+\mu\vnabla h(a,b,c)\) for some real numbers \(\la\) and \(\mu\text{.}\) The three components of the equation
\begin{equation*}
\vnabla f(a,b,c)
=\la\vnabla g(a,b,c)+\mu\vnabla h(a,b,c)
\end{equation*}
are exactly the first three equations of
2.10.9. This completes the explanation of why Lagrange multipliers work in this setting.