Oh ok thename1000, sure think I just assumed since the answer was there.
So question #1, you need to first find k. Now you don't need to integrate anything to find k for the first question as we are given the force and the length of the spring from which we can determine the extension, so we can use F = kx = k*(amount stretched from natural length correctly know as the extension), I assume W means weight in your equation and not work :D.
Now be careful with how you interpret the equation F = kx, because technically that's the correct form of the equation, it should be:
<br />
F = -kx<br />
where F is tension in the spring, and x is the extension in the spring. Now it also has a negative value, because the tension force acts in the opposite direction to the direction of extension. You may already know this but its good to reiterate :D
The reason why we can write it as F=kx and not F=-kx is all to do with whether F represents the tension in the spring (generally the elastic material) or it represents the force extending the spring, caused either by someone who has pulled it or a mass suspended on the end of the spring.
Anyway back to the question. So we have found k now we need to find the work done to extend the spring to 2m. Now another way of looking at that is how much Elastic Potential energy is there stored in the spring. Now hopefully you have been told how one can find this energy, as understand why is important, but the long and short of it is we integrate hooks law (the F=kx) with respect to x, thus arriving at the equations that I previously posted.
Now bar actually telling you how to do this problem I think that's all I can say. Have a go at doing 1.) yourself and 2.) if you can, then once you have done as much as you can if you can't get the answer post back here and well try to give you gentle nudges in the right direction :D