Consider the following reaction: Draw a complete curved-arrow mechanism for the formation of product A. Explain (using resonance diagrams) why product A is observed instead of product B.
Drawn below is the mechanism of the reaction
the first step is formation of a stable carbocation. The resulting carbocation shown is stabilized by resonance with lone pair of oxygen. Thus this gets attacked by nucleophilic methanol to give the end product product A and not B which would form less stable carbocation.