From に (ni), particle indicating location + 代えて, conjunctive form of 代える (kaeru, “substitute”).
に代(か)えて • (ni kaete)