Identify the major products A and B respectively in the following set of reactions. [2024]

(3)

This is acylation of alcohol