The gradient of F is a normal vector to the surface \(F(x,y,z)=0\). Similarly, grad G is a normal vector to the surface \(G(x,y,z)=0\). The intersecting line of two surfaces is orthogonal to these vectors. So tangent vectors are multiple of \(\text{grad}\; F\times \text{grad}\; G\).
This is not a problem in elementary geometry. It should be an Advanced Calculus problem!!!