The metallic character of elements decreases from left to right across a period. Thus, the metallic character of Mg is more than that of Al. The metallic character of elements increases down a group. Thus, the metallic character of Al is more than that of B. Considering the above statements, we get K > Mg. Hence, the correct order of metallic character is K > Mg > Al > B.