The question doesn't provide enough data to be solved, but I'm assuming some magnitudes to help you to solve your own problem
Answer:
The maximum height is 0.10 meters
Step-by-step explanation:
Energy Transformation
It's referred to as the change of one energy from one form to another or others. If we compress a spring and then release it with an object being launched on top of it, all the spring (elastic) potential energy is transformed into kinetic and gravitational energies. When the object stops in the air, all the initial energy is now gravitational potential energy.
If a spring of constant K is compressed a distance x, its potential energy is

When the launched object (mass m) reaches its max height h, all that energy is now gravitational, which is computed as

We have then,


Solving for h

We have little data to work on the problem, so we'll assume some values to answer the question and help to solve the problem at hand
Let's say: x=0.2 m (given), K=100 N/m, m=2 kg
Computing the maximum height


The maximum height is 0.10 meters