In the given reaction
'A' can be

From the JEE Main 2022 · 25 Jun · Shift 2 paper. Try it, check your answer, then read the worked solution below.
In the given reaction
'A' can be

Try it yourself first, then check your working against this.
Worked solution
Grignard. An ester takes two equivalents of : gives . To get , R must be phenyl, so A is bromobenzene.
(B)
Concepts used: ester + 2 RMgX
Every past question tagged to the same part of the syllabus, with solutions.
All JEE Main questions on Alcohols, Phenols and Ethers · All JEE Main questions on Carboxylic Acids and Derivatives
Past questions on the same topic (Alcohols), each with a worked solution.
Timed, in the real format, and marked the moment you submit.