The spring in effect just changes the direction of the block and shoots it back up the ramp with the same speed it hit it at, just in the opposite direction.
When solving part b., make sure to take gravitational PE into account as well as spring PE.