Can someone please explain how the direction vector was found in problem $2$ of this worksheet?
Below is an image of the problem $2$ of the worksheet.
You want to know the tangent line to the ellipse at the given point along the plane $y=2$, so go ahead and plug in $y=2$ to obtain $4x^2 + 8 + z^2 = 16$. Take the total differential to obtain
Note that the tangent line is parallel to the $y=2$ plane so the vector should not be changing in the $y$-direction. Moreover, any nonzero scalar multiple of $(1,0,-2)$ will also work.
Thus the tangent line is $$ l(t) = (1+t, 2, 2-2t), $$ or you could also write it as $$ l(t) = (1,2,2)+ t(1,0,-2), $$
where $t$ varies over the reals.
Firstly by the observation direction vector should lie at the $zx$ plane so $y$ in the direction vector should be $0$. Secondly after that he is thinking of the slope of the direction vector as the direction vector of the fuction $ z(x)$ where the direction vector is that case is $(1,z'(x_0))$