I'm having a bit of trouble with this problem. Mostly trying to label sufficient variables for the system.
A body moves in a straight line on a smooth horizontal table. The body is attacked to one end of a spring of length $l_0$ and modulus of elasticity $\lambda$. The other end of the spring is fixed. Write down the equation of motion.
With systems like these I always try to draw a diagram and label it to make it more intuitive and understandable.
Where $x$ is the displacement of the body from the fixed point $O$.Edit: Where the spring is attached to the wall. I forgot to add it in my diagram.
$$F_{net}= m\ddot{x}= -kx=-k(l-l_0)$$
Is this labelling correct?
$$m\ddot{x}= -\dfrac{\lambda}{l_0}(l-l_0)$$
where $k=\dfrac{\lambda}{l_0}$
$$\boxed {\ddot{x}+\dfrac{\lambda}{ml_0}x= \dfrac{\lambda}{m}}$$
(b) Obtain the energy equation
$$\int{m\ddot{x}}= \int{F(x)}$$
Multiplying both sides by $\dot{x}dt$ allows to integrate $F(x)$ w.r.t $x$.
$$\begin{align} \int{m\dot{x}d\dot{x}} & = \int{Fdx} \\ \int{m\dot{x}d\dot{x}} & = \int{-kx} \\ \dfrac{1}{2}m\dot{x}^2 +C & = -\dfrac{kx^2}{2} + D \end{align}$$
where $C$ and $D$ are constants of integration. Rearranging gives us the energy equation.
$$\boxed{\dfrac{1}{2}m\dot{x}^2 +\dfrac{kx^2}{2} =E}$$
(c) The body is released from rest when the spring length is $\dfrac{l_0}{3}$. Sow that the maximum velocity of the body during the subsequent motion is $\dfrac{2}{3}\sqrt{\dfrac{\lambda l_0}{m}}$
To solve this problem we need to use the conservation of energy. Which states
$$K.E_i + P.E_i = K.E_f + P.E_f$$
We are told the the initial velocity is 0 and the length of the spring is $\dfrac{l_0}{3}$ at that time. The maximum velocty occurs when the kinetic energy is a maximum - when the potential energy is a minimum ($x=0$)
$$\dfrac{1}{2}m\dot{x}^2_0+\dfrac{k\Big(\dfrac{l_0}{3}^2\Big)}{2}= \dfrac{1}{2}m\dot{x}_{max}^2 +\dfrac{k(0)}{2}$$
The initial Kinetic energy goes to $0$ and the final potential energy does to $0$.Leaving
$$\begin{align}\dfrac{1}{2}m\dot{x}_{max}^2 & = \dfrac{k\Big(\dfrac{l_0}{3}^2\Big)}{2} \\ m\dot{x}_{max}^2 & = \dfrac{\lambda l_0}{9m}\\ \dot{x}_{max} & = \dfrac{1}{3}\sqrt{\dfrac{\lambda l_0}{m}} \\ \end{align}$$
I've gone wrong somewhere, I don't know if my assumption of $x=0$ is correct. That's why I think my labelling is incorrect and I think it's very important for me to figure this out.
(d) The body is given a velocity $V$ when the spring length is $l_0$.Find the maximum of the spring in the subsequent motion.
The maximum length of the spring is when the P.E is a maximum so when the K.E is $0$. Again we are given the conditions with initial velocity = $V$ and the starting position to be at equilibrium $l_0$. I used the conservation of energy again and I got the result
$$x_{max} = \sqrt{\dfrac{ml_0 V^2}{\lambda}+l_0}$$
That was when I plugged my values in for initial velocity and initial position. The same as in part (c) but with maximum distance this time.
(e)Find the minimum length of the spring.
I'm not so sure how to find the minimum length. Do I get the minimum by subtitling the maximum from something?
Thanks for looking over it, I struggled quite a bit with this one even thought the maths isn't the hardest. I can't seem to label it with confidence.

In part (c), the spring length is $\frac{l_0}{3}$, which means the spring is compressed by $\frac{2l_0}{3}$. You got the two mixed up, hence getting the wrong answer. I believe Part (d) and (e) has the same conditions, so the maximum and minimum lengths are $$ l_0\ \pm \ \sqrt{\frac{ml_0v^2}{\lambda}} $$