Reaction of 4-bromomethylbenzonitrile (I) with 1,2,4-triazole (II) in chloroform - acetonitrile gives 1-(4-cyanophenyl)methyl-1,2,4-triazole (III), which is treated with potassium tert-butoxide and 4-fluorobenzonitrile (IV) in DMF.