Potassium is 2,8,8,1 . Oxygen its 2,6. So you take the 1 from both of the potassiums and put it in the oxygen, therefore supplying the oxygen with the right amount of electrons.
It takes two potassium to supply the electrons of one oxygen.
This way it becomes Oxygen 2,8
Its kind of hard to explain lol.