Intersection of surfaces is a curve if intersection of tangent planes is line I think I need a hint in solving the following exercise:

Let $S_1$, $S_2 \subseteq \mathbb R^3$ be surfaces (i.e. 2-dimensional submanifolds), with nonempty intersection $\Gamma := S_1 \cap S_2.$ Show that, if $V :=T_pS_1 \cap T_pS_2$ is a line for each $p \in \Gamma$, then $\Gamma$ is a curve.  

Now this is intuitively clear, but the problem is how to prove it formally.
Thoughts:
Fix $p\in S_1$. Since $S_1$ is a surface we can find an open neighbourhood of $p$, $U\subseteq \mathbb R^3 $ and a differentiable map $f: U \to \mathbb R$ with $S_1\cap U = f^{-1}(\{0\})$ and $\nabla f(q) \neq 0$ for each $q\in S_1 \cap U$.  
Now $T_pS_1$ = $\ker (D_p f)$ and therefore $D_p f(V) = \{0\}$. Is this going in the right direction? Another idea was to modify $f$ to get a map $\tilde f:W \to \mathbb R$ for some open subset $W \subseteq \mathbb R^2$ which then describes the curve, i.e. $\Gamma = f^{-1}(\{0\})$. Any hints appreciated!

If $\Gamma=S_1\cap S_2$, then for $p\in \Gamma$, $$ T_p\Gamma =T_pS_1\cap T_pS_2 $$ is a line so that tangent space $T_p\Gamma$ is well-defined. So $\Gamma$ is 1-dimensional so that it is a curve.
