In the first reaction, the amine group undergoes nitrosation with nitrous acid (HNO) resulting in the formation of an unstable intermediate, which leads to the product X, an amine group (MeNH) attached to the carbon chain.
In the second reaction, the same nitrosation process is carried out, but since the structure has an-OH group, the nitrosation leads to the formation of Y, a hydroxyl group (MeOH)
The correct option is (A) :