The Goldman equation is your friend when understanding voltage changes in neurons. Forget about ion concentration changes unless you're focusing on them specifically, they are ordinarily too small to matter in the cycle of an action potential. What matters instead is permeability, and changes in permeability to different ions underlies all of the voltage changes you see in a neuron: responses to excitatory and inhibitory neurotransmitters, triggering and propagation of action potentials, repolarization, hyperpolarization, everything.
It's also helpful to think about the Nernst equation, which is very similar to the Goldman equation except it involves only one ion. The Nernst equation will give you the "reversal potential" (or "Nernst potential" or "equilibrium potential"; your "EK" is for "Equilibrium potential for K") for each ion. When you increase permeability of the membrane to some ion, the result will always move the cell's potential in the direction of that ion's reversal potential.
During an action potential, there is a positive feedback loop involving voltage-gated sodium channels; as more sodium permeability opens up in the membrane, the voltage moves towards the reversal potential for sodium, which is typically around +20 mV, far more positive than rest. In mammalian neurons, repolarization is aided by opening voltage-gated potassium channels, at the same that the sodium channels close. The reversal potential for potassium is typically around -90 mV, slightly more negative than rest.
Because there is more permeability to potassium while these channels are open compared to rest, the membrane potential will be closer to the reversal potential for potassium than at rest.
As the voltage-gated potassium channels close, that additional permeability to potassium is gone and the cell is back to having only resting "leak" channels open, so it returns to the resting voltage. Yes, these are also most permeable to potassium, but the resting cell also has some small permeabilities to other ions, hence why the resting potential (typically around -70 mV, -65 mV) is slightly more positive than just potassium's reversal.
Some textbooks and internet resources say stupid things about the role of the sodium/potassium pump, and say it's necessary for "returning the cell to rest" or something like that, which misleads students like you into thinking that the pumps are important for this recovery from afterhyperpolarization. You know how I mentioned that ion concentration changes are too small to matter? Well, if the Na/K pump wasn't working, those small changes would accumulate over time (think minutes to hours; not a fraction of a second) and would matter. Thanks to the pump, your life can be simpler as you understand neurophysiology, because the pump is always keeping the concentrations of sodium and potassium different inside the cell compared to outside. If you're just thinking about one action potential cycle, though, forget the pump!