By condensation of 1H-indazole-3-carboxylic acid (I) with 2,4-dichlorobenzyl chloride (II) by means of NaOH in water heated over a steam bath.
The alkylation of ethyl 1H-indazole-3-carboxylate (I) with 4-chloro-2-methylbenzyl chloride (II) by means of sodium ethoxide in refluxing ethanol gives ethyl 1-(4-chloro-2-methylbenzyl)-1H-indazole-3-carboxylate (III), which is then hydrolyzed with NaOH in refluxing ethanol - water.