Pick the initial side of the equation to be just before the string is cut. Then for part a) the final side of the equation will be for max compression of the spring.

As far as a 0 GPE is concerned I typically put it at the lowest point in the diagram. However here it would be more convenient to set it where the block is released. Remember, your GPE's will all be negative in this case.

For b) pick an arbitrary position of the block before max compression. So the block now has a speed v and position y = -x. (With the same initial side as in part a).) Solve this for v. What condition x maximizes v? (This is a Calc I min/max problem.)

-Dan