Is it right to assume zero gravitation energy when holding an object over pushing it against a spring for the estimation of its max compressed length? I'm still baffled by this problem which seems relatively easy and although the answers do check I'm confused if what I intended to do was right theoretically and conceptually. So I hope somebody can guide me in the right direction while reading my problem.
The problem is as follows:

A spring with $k=25.0 \frac{N}{m}$ is oriented vertically with one end
  fixed to the ground. A 0.100-kg mass on top of the spring compresses
  it. Find the spring s maximum compression in each of these cases: (a)
  You hold the mass while you gently compress the spring,and when you
  release the mass it sits at rest atop the spring. (b) You place the
  mass on the uncompressed spring and release it. (c) You drop the mass
  from $\textrm{10.0 cm}$ above the spring.

What I tried to do was this:
(a) Actually I am not sure how to interpret or understand in an equation what was meant by holding it, compressing and releasing it so it rest atop the spring. My guess was that holding it will cancel the effect of the gravitational potential energy thus by releasing it the only resulting effect would be the gravitation force or weight. (This is the part where I'm confused at, so a clarification is urgently needed)
Anyways what I did was since, $F=kx$
Therefore the weight would be $mg$;
$mg=kx$
$x=\frac{mg}{k}= \frac{0.1\,kg\times9.8\,\frac{m}{s^2}}{25\,N}=0.0392\,m$
to which results in $0.0392\,m$
This part seems to check, but again I don't know if this was the "right" interpretation as it would seem contradictory with the following question in part b.
(b) This is where I'm also stuck at as, just placing it over the spring wouldn't it had the same effect as the previous case?.
But then I thought, what if meant that the energy in this case is related to Initially there is gravitational potential energy (being released) and finally there is the elastic potential energy due the spring. (This part I'm unsure)
Anyways, this would be translated into:
$E_{initial}=E_{final}$ as conservation of energy
$mgh=\frac{1}{2}kx^2$
This part I understood the height which the mass travels during fall is the same which would be compressed therefore (in other words $h=x$);
$mgx=\frac{1}{2}kx^2$
$mg=\frac{1}{2}kx$
$x=\frac{2mg}{k}=\frac{2\times 0.1\,kg \times 9.8\, \frac{m}{s^2}}{25\,N}= 0.0784\,m$
To where I obtained $0.0784\,m$
This part checks with the answer in the back of my book
(c) Finally for this part I assumed that dropping from a certain height would meant to add up for the height the ball is falling plus the height that will be compressed by the spring;
So again referring to the conservation of energy:
$E_{initial}=E_{final}$ as conservation of energy
$mgh=\frac{1}{2}kx^2$
$mg\left(10\times 10^{-2}m+x\right)=\frac{1}{2}kx^2$
By rearranging a bit (because this would result in a second degree equation):
$\frac{1}{2}kx^2-mgx-0.1mg=0$
by mutiplying by 2 to both sides:
$kx^2-2mgx-0.2mg=0$
Then by applying the solution method for these equations:
$x_{1,2}=\frac{+2mg\pm\sqrt{\left(2mg\right)^2+4\times 0.2kmg}}{2\times k}$
Then inserting the values given:
$x_{1,2}=\frac{+2\times 0.1\,kg \times 9.8\,\frac{m}{s^2} \pm\sqrt{\left(2\times 0.1\,kg\,\times 9.8\,\frac{m}{s^2}\right)^2+4\times 0.2 \times 25 \, N \times 0.1\,kg\times 9.8\,\frac{m}{s^2}}}{2\times 25\,N}$
$x_{1}= 0.136\,m$
$x_{2}=-0.05763\, m$
Therefore I discarded the negative result. So that the maximum compressed reached by the spring would be $0.136\,m$
Which checks with the answer in the back. However the problem was below Work done by a variable force and to solve this problem I had to resort to conservation of energy. So is there another way to solve this problem without using conservation law?.
 A: Maybe it's easier to understand if you start from part (b). When the string is uncompressed, you don't have an equilibrium (the net force on the mass is $mg$), so the spring will start compressing. Since there is a net force downward, the object keeps accelerating downwards. At some point you reach the height where you have equilibrium of the forces, so the acceleration is zero. But your object has a finite velocity, so it will keep moving downward. Once you pass the equilibrium point, the elastic force is greater than the gravity, so the object will decelerate, until the velocity is $0$. This is the maximum compression. And since you are talking about velocity, you are probably related to conservation of energy. Just think of what's happening next. Since the spring is very compressed, the net force on the object is now pointing upward. So the object keeps accelerating upwards, until it passes through the equilibrium point (with some velocity upward), when it decelerates again, until the velocity is zero, and the cycle keeps repeating. The mass keeps oscillating. So you cannot just use $kx=mg$ since that occurs only at equilibrium.
Now case (a) can be understood as follows: we slowly lower the mass $m$, so that when it reaches the equilibrium point, the velocity (and kinetic energy) is zero. So what happened to the potential energy? It was absorbed by the hand. Since you are now at equilibrium, you can use that the sum of the forces is zero.
With these first two cases in mind, part (c) is just equivalent to part (a), but with extra energy added to the system. Once again, when you have the equilibrium of the forces, you have a non-zero velocity, so you keep moving. The maximum compression can be again calculated only from $v=0$ condition.
EDIT: Here is how to solve the same problem part (b) using work:
Work is being done by gravity and by the spring. The initial position is $x=0$, and we choose the positive direction downward, so that the final position is $x=x_{max}$. Since initially the velocity is $0$, and at the maximum compression the velocity is zero as well, the variation of the kinetic energy is $0$. So the sum of the works done by gravity and spring must be zero.
Work done by gravity $$W_g=\int_0^{x_{max}}mg dx=mgx_{max}$$
Work done by the spring $$W_s=\int_0^{x_{max}}(-kx)dx=-\frac12 kx_{max}^2$$
Summing and finding $x_{max}$ you get either $x_{max}=0$ or $x_{max}=\frac{2mg}k$
For part (c), the only difference is that the gravity acts for longer. Starting from height $-h$: $$W_g= \int_{-h}^{x_{max}}mg dx=mg(x_{max}+h)$$
Meanwhile, the spring acts in the same interval as in part (b) 
