Solution (source code)

= Solution

Let $I(N)$ be the <vanishing ideal of an embedded submanifold>. Tangency says $X(I(N)),Y(I(N))\subseteq I(N)$. Hence, for $h\in I(N)$,
$$
[X,Y]h=X(Yh)-Y(Xh)\in I(N),
$$
so the criterion from part (d) makes $[X,Y]$ tangent to $N$.

In adapted coordinates, the tangential coefficients of the displayed bracket use only the restrictions of the tangential coefficients of $X,Y$ and their derivatives along $N$; all normal coefficients vanish there. Consequently
$$
[X,Y]|_N=[X|_N,Y|_N],
$$
so the restriction depends only on $X|_N$ and $Y|_N$. This is <tangency under the Lie bracket>.