Let $f : \mathbb R^n → \mathbb R$ be a continuously differentiable function with non-zero gradient. Then, according to the implicit function theorem a level set defines a $n-1$ dimensional manifold $M$ and the gradient of $f$ is perpendicular to $M$.
Now, assume that we have a second function $g : \mathbb R^n → \mathbb R$ also continuously differentiable with non-zero gradient.
How to prove or refute precisely that if for all points in $M$ (defined by the level set of $f$) the direction of the gradient of $f$ and $g$ is identical (but not the length), then $M$ is also a manifold defined by a level set of $g$.
Suppose that $M=f^{-1}(a), a\in R$, for every $x$ in $M$, we have to show that $g$ is constant on the connected component of $M$ which contains $x$. Let $c:I\rightarrow M$ be a differentiable path such that $c(0)=x$, ${d\over{dt}}g(c(t))=\nabla g_{c(t)}.c'(t)=u(t)\nabla f_{c(t)}c'(t)=0$ since the restriction of f to M is constant and $\nabla f$ is proportional to $\nabla g$. This implies that $g$ is constant on $c$ and henceforth on the connected component of $M$ which contains $x$.