It is an example of SNAr reaction. In this reaction carbanion is formed as an intermediate. Hence, the rate of reaction depends on stability of carbanion. These carbanion are stabilised by electron withdrawing groups attached to benzene ring. A nitro group from para position activate more for SNAr reaction due to electron withdrawing resonance effect than from meta position by inductive effect.