The major products formed:
A and B respectively are:

From the JEE Main 2024 · 6 Apr · Shift 2 paper. Try it, check your answer, then read the worked solution below.
The major products formed:
A and B respectively are:

Try it yourself first, then check your working against this.
Worked solution
is o/p-directing; nitration gives mainly p-nitroanisole (A, steric preference for para).
In A, the positions ortho to are also meta to , so both directing effects agree; excess /Fe gives 2,6-dibromo-4-nitroanisole (B).
(D)
Concepts used: directing effects of OCH₃ and NO₂
Every past question tagged to the same part of the syllabus, with solutions.
All JEE Main questions on Hydrocarbons · All JEE Main questions on Alcohols, Phenols and Ethers
Past questions on the same topic (Aromatic hydrocarbons and electrophilic substitution), each with a worked solution.
Timed, in the real format, and marked the moment you submit.