Here is a way to get the function $h$. The idea is that one can define the smooth map $F \, : \, \mathbb{R}^3 \, \to \, \mathbb{R}^2$ by
\begin{align}
s &= f(x)\\
t &= g(x)
\end{align} where $x = (x_1, x_2, x_3) \in \mathbb{R}^3 $. The restriction $$\nabla f(x) \times \nabla g(x) = 0$$ for all $x \in \mathbb{R}^3 $ implies that the tangent map $DF(x)$ (the Jacobi 2 x 3 matrix of partial derivatives of $f$ and $g$) is singular, meaning that it is not a submersion, i.e. it is not locally surjective. Let us assume that for $x \in U \, \subseteq \, \mathbb{R}^3$ in an open domain $U$ the gradient $\nabla f(x) \neq 0$. Then the image $F(U)$ is not an open subset of $\mathbb{R}^2$ but a one dimensional smooth curve because $\text{rank} \, DF(x) = 1$. To construct this curve, take a solution $x = x(\sigma)$, with $\sigma \in \mathbb{R}$, of the system of ODEs
$$\frac{dx}{d\sigma} = \nabla f(x)$$ Then the curve in question is given by
\begin{align}
s &= f\big(x(\sigma)\big) = s(\sigma)\\
t &= g\big(x(\sigma)\big) = t(\sigma)
\end{align}
Indeed, when you check the derivative
\begin{align}
\frac{ds}{d\sigma} &= \nabla f\big(x\big) \cdot \frac{dx}{d\sigma} = |\nabla f(x)| \neq 0\\
\frac{dt}{d\sigma} &= \nabla g\big(x\big) \cdot \frac{dx}{d\sigma} = (\nabla f(x) \, \cdot \, \nabla g(x))
\end{align}
This means that the function $s = s(\sigma)$ can be inverted and written as
$\sigma = \sigma(s)$. After that, one can substitute $\sigma$ in $t = t(\sigma)$ obtaining the function $t = \phi(s) = t\big(\sigma(s)\big)$. Consequently, one can write $h(s,t)$ as
$$h(s,t) = k\big( \phi(s) - t \big)$$ for any non-constant smooth $k(r)$ function with $r \in \mathbb{R}$.
Edit. On the one hand, the system of ODE's
$$\frac{dx}{d\sigma} = \nabla f(x)$$ is not necessarily solvable explicitly. On the other hand, however, this system is not that important, I just took it as a way of systematically obtaining a curve $x = x(\sigma)$ transverse to the level surfaces $C_s = \{x \, : \, f(x) = s\}$ for $s \in \mathbb{R}$ (or a subset of it). You might as well take $$\frac{dx}{d\sigma} = \nabla g(x)$$ or if you work locally, simply take the straight line
$$x = x(\sigma) = x_0 + \sigma \, \nabla f(x_0)$$ which for $\sigma$ near $0$ is still transverse to the level surfaces $C_s$ near the point $x_0$ (in some cases that line could be transverse to almost all of the level surfaces). Basically, any explicit curve $x=x(\sigma)$ transverse to the level surfaces $f(x) = s$ (or transverse to the more or less the same level surfaces $g(x) = t$) will do the job. Whatever works.