In order to assign O's e- configuration we need to find it on the periodic table. We can see it is on the 2nd period and in group 6 (also sometimes called 16). This means it fills 2 shells and has 6 valence e-s (e-s in the outer shell). The first shell can accommodate 2 e-s and the 2nd is the valence shell which we know must take 6 (although it can take up to 8 e-s). Hence the electron configuration is 2,6.O2- is an Oxygen atom which 2 more electrons. This can be confusing as minus normally means less, but electrons are negatively charged so having 2 of them would give a total charge of 2- (2 x -1). All elements start off neutral so if we give 2 electrons to Oxygen its new charge is therefore 2-. Now we have sorted that we simply add 2 electrons to the previous configuration giving 2,8. A quick tip is that ions almost always have a complete outer shell e.g. 2 or 2,8 or 2,8,8. (e- is shorthand for electron)