An oxide of metals X reacts with magnesium but it does not react with copper. The order of reactivity of X, magnesium and copper starting with the most reactive is;
Mg, Cu, X
X, Mg, Cu
Mg, X, Cu
Cu, X, Mg