posted by Bertrand .
I'm still confused about how you got the (1/8)kx^2 and how to find the weight's maximum height at the top of its path through the air.
I don't know about your 1/8kx^2 you posted above, I didn't see it in the post.
If you know the initial potential energy, 1/2 kx^2, that has to turn to gravitational PE mgh at the max height.
set them equal, and solve for h.