Consider a spring mass system. A block is attached to a light vertical spring which is stretched under the load of block and this system is at a height $h$ from the ground.
Now my problem is that what is the potential energy stored in the block and in the spring at the equilibrium?
Next, consider the block is given a sharp impulse from below so that it acquires an upward speed. Now what is the potential energy stored in the block at this particular interval of time?
To answer your follow up question, the reason why the book did not consider gravitational potential energy at the initial point when the block was held at equilibrium, is because they set the axis in a way that the block's vertical displacement = 0 is at the block's natural hanging state (equilibrium). Note that if you compare two states of the system, what concerns you is the change in potential energy ONLY, $mg\Delta h$.
Of course, you could consider the ground to be your $y=0$, and the initial state when the block hangs at equilibrium would have potential energy -- you will realize that it's the same as considering it to have no gravitational potential energy if you look through this calculation.
Assume the ground is $y=0$, and the block hangs at heigh $h_0$ above the ground. After it is shot up, it reaches a height $h$. Then, by the conservation of energy,
$KE + (EPE)_0 + mg(h_0) = (EPE)_f + mg(h_f)$
How high it goes is obviously $h_f-h_0$ so really, it's the $\Delta h$ that your answer is concerned with. Your book sets the equilibrium natural hanging position as $y=0$, so the height $h$ calculated assuming no initial GPE will automatically be equivalent to $h_f-h_0$.
Try to consider the changes in KE, and how it alternates with EPE and GPE. You should also try and think about what happens to the velocity and acceleration of the mass when it reaches equilibrium, and when it is at maximum amplitude above and below the equilibrium point (consider the energies involved in those 3 specific points). This should give you some direction towards your answer.