Synthesis of methyl 2-(heteroaryl)propanoates via palladium-catalyzed reaction