Two types of metallic character
In fact, there are two type of metallic character if you look at the metal from the chemical point of view or if you look at the metal from the physical point of view:
So it really depends on how do you define metallic character
Chemical metallic character
Since metallic character in chemistry is defined as:
the tendency of an atom to lose electrons.
We can understand that it is directly related to electronegativity.
chemical property that describes the tendency of an atom to attract
electrons (or electron density) towards itself
Basically, it is the opposite (that would be Electropositivity...)! An so it increases from right to left. The picture below shows the electronegativity but can be used for the purpose.
I think the reasoning that the book wants you to do is not remembering all the subshell but just the basic chemistry principles.
So from the chemical point of view $\ce{Mg}$ has a greater metallic character compared to $\ce{Al}$.
Physical metallic character
The physical metallic character is defined taking in account the physical properties of the metal. A metal, from the physical point of view, has a high electrical conductivity, high thermal conductivity, and high density.
These properties are harder to predict:
In this case, however, $\ce{Al}$ has a more metallic character compared to $\ce{Mg}$.