Answer:
K < Mg < P < O
Step-by-step explanation:
The trend for electronegativity is that it increases as you go up and to the right of the periodic table. If we look at the periodic table, O is more to the right and up of P and the other elements. Then we see that P is more up and right to the other elements. Then we see that Mg is more up and to the right of K. So we get the order of K < Mg < P < O. Hope this helps!