Finding equations of all lines that lie entirely on a surface and passes through a point Let $S$ be the surface $x^2 + y^2 - z^2 = 1$ and $P(1,1,-1)$ be a point on $S$. Find the equations for all lines passing through the point P which lie entirely on the surface $S$.
At point $P$, the equation of the tangent plane of the surface $S$ is: $x + y + z =1$ (1)
The line equation $L: r = <1 + at, 1 + bt, -1+ct>$ must satisfy both equation (1) and the equation of the surface.
Substituting $L$ into the tangent plane equation yields $(a + b + c)t = 0$
While subsittuting $L$ into the surface equation yields $2(a + b -c) + (a^2 + b^2 -c^2)t = 0$
We must have $a + b +c =0 , a + b -c = 0, a^2 + b^2 -c^2 = 0$, which then solving yields $a = b = c = 0$.
I might have done something wrong while working on this question, thanks @Arthur for the help and information for me to improve my question. 
Any help on this will be appreciated!
 A: Hint: The lines will be perpendicular to the surface normal at $P$. That means they must lie in the tangent plane at $P$.
Analyzing your attempt:
You have the right plane. And you are right that the plane gives you the equation
$$
a+b+c = 0
$$
when you insert the expression for the line into the equation for the plane. However, you didn't insert correctly into the equation for the surface. There we have
$$
(at+1)^2+(bt+1)^2 - (ct-1)^2 = 1\\
t^2(a^2+b^2-c^2) + 2t(a+b+c) = 0
$$
which simplifies to $a^2+b^2 = c^2$. Now you have two equations you can solve which should give you your two lines.
Alternate solution: This is how I first thought to solve the problem: Rearrange the plane equation to $z = 1-x-y$, and insert that into the equation for the surface:
$$
x^2+y^2-(1-x-y)^2 = 1\\
x^2 + y^2 - (1+x^2+y^2-2x-2y+2xy) = 1\\
xy-x-y+1 =0\\
(x-1)(y-1) = 0
$$
What does this mean? When we inserted the equation for the plane into the equation for the surface, we got a third equation which represents a different set of points in space. This third set intersects the plane in the same places that the surface does, and the new equation is easily solved to give $x = 1$ or $y = 1$. From here it's not difficult to find the two lines in the plane $x+y+z = 1$ satisfying either of these constraits, and we're done.
