The reaction of dimethyl 2,6-dimethoxyterphthalate (I) with hydroxylamine by means of polyphosphoric acid at 70 C gives methyl 4-(N-hydroxycarbamoyl)-3,5-dimethoxybenzoate (II), which by further reaction with PPA is converted into methyl 4-amino-3,5-dimethoxybenzoate (III). The reaction of (III) with NaNO2 and HBr affords the corresponding diazonium salt, which without isolation is treated with CuBr yielding methyl-4-bromo-3,5-dimethoxybenzoate (IV). The reduction of (IV) with diisobutylaluminum hydride in THF gives 4-bromo-3,5-dimethoxybenzaldehyde (V), which is condensed with 3-methoxypropionitrile (VI) by means of sodium methoxide in refluxing methanol to yield 4-bromo-3,5-dimethoxy-alpha-(methoxymethyl)cinnamic acid nitrile (VII). Finally, this compound is cyclized with guanidine (A) by means of sodium methoxide in hot methanol DMSO. 2) The hydrolysis of (IV) with KOH in ethanol gives 4-bromo-3,5-dimethoxybenzoic acid (VIII), which is treated with SOCl2 in refluxing benzene - DMF to afford 4-bromo-3,5-dimethoxybenzoylchloride (IX). Then the reduction of (IX) with H2 over Pd/BaSO4 in xylene yields (V), already obtained.
The reaction of (V) with 3-morpholinopropionitrile (X) by means of sodium methoxide in methanol - DMSO gives 4-bromo-3,5-dimethoxy-alpha-(morpholinomethyliden)hydrocinnamic acid nitrile (XI), which by reaction with aniline (B) and HCl in refluxing isopropanol is converted into 4-bromo-3,5-dimethoxy-alpha-(anilinomethyliden)hydrocinnamic acid nitrile (XII). Finally, this compound is condensed with guanidine (A) as before.