Correct option is B
Iodomethane, also called methyl iodide, and commonly abbreviated "MeI", is the chemical compound with the formula CH3I. It is sterically open for attack by nucleophiles, and iodide is a good leaving group. It is used for alkylating carbon, oxygen, sulfur, nitrogen, and phosphorus nucleophiles.
The given fused system comprises of a pyridine ring and a pyrrole ring. In the given fused system, the lone pair on the nitrogen atom (six membered ring) can be donated in the σ* of MeI.
In the five membered ring, the lone pair on the nitrogen atom are involved in conjugation and thus are not available for donation.
Pyridine is nucleophilic at the nitrogen atom because the lone pair of electrons on nitrogen cannot be delocalized around the ring. They are in a sp2 orbital orthogonal to the p orbitals in the ring and there is no interaction between orthogonal orbitals.

In pyrrole, the nitrogen lone pair is delocalized round the ring. All the delocalization pushes electrons from the nitrogen atom into the ring and we expect the ring to be electron-rich at the expense of the nitrogen atom. The HOMO should go up in energy and the ring become more nucleophilic.







