Solution (source code)

= Solution

\b[<Sodium borohydride> is chemoselective for the <ketone>; <lithium aluminium hydride> reduces both the <ketone> and the <lactam>.] In an <amide>, donation of the N <lone pair> into the carbonyl $\pi$ system reduces the carbonyl carbon's <electrophilicity>. It is therefore substantially less susceptible to the milder <hydride> donor.

<Lithium aluminium hydride> supplies more strongly reducing <hydride> equivalents, and the strong affinity of <aluminium> for <oxygen> assists removal of the amide <oxygen> through the <iminium> pathway. This difference explains both the unchanged <lactam> carbonyl in B and the absence of that <oxygen> in C. Both reactions are interpreted after the usual protonating workup.