Solution (source code)

= Solution

The tangent-normal <short exact sequence>
$$
0\longrightarrow TY\longrightarrow TX|_Y\longrightarrow N_{Y/X}\longrightarrow0
$$
gives $\det(TX|_Y)\cong\det(TY)\otimes N_{Y/X}$. Dualizing and using the <canonical bundle>,
$$
K_X|_Y\cong K_Y\otimes N_{Y/X}^*.
$$
Since $N_{Y/X}\cong\mathcal O(Y)|_Y$, rearrangement proves the <Adjunction formula>
$$
\boxed{K_Y\cong(K_X\otimes\mathcal O(Y))|_Y.}
$$