answer and explanation
the spontaneity of a reaction depends on the Eo value of the reaction.
those that have a positive Eo value proceed spnteaieusly whle those that do not, will not proceed spontenaously.
looking at the table when we look at Al we can see that it is more active that Zn but less active than Mg and so we can predict that the E value of Zn/Al will be negative and proceed spontaneously while for Mg/Al it would not.