Macromolecular substitution reactions and polymerization in the presence of two macromolecular matrices