OK, for a (i) can you see how the lengths are related, right?
From the diagram you should be able to see that
$\displaystyle \boxed{y+l = d + x}$
by equating the distances that get you from the wall to the mass $\displaystyle m_1$ .
ii. &iii. What are the salient features here:
1. The string over the pulley transmits the same tension force, $\displaystyle T$ to each mass.
2. The fact that $\displaystyle m_1$ and $\displaystyle m_2$ are connected in this way means they must have the same acceleration.
3. The table is smooth so there's no friction forces on $\displaystyle m_2$ .
So for the mass $\displaystyle m_1$ you must have:
$\displaystyle \boxed{m_1 a = m_1 g - T}$ [1]
where $\displaystyle g$ is the acceleration due to gravity and $\displaystyle a$ is the inertial acceleration. This is from Newton II.
Using Newton II for mass $\displaystyle m_2$ we must have:
$\displaystyle \boxed{m_2 a = T - F_s}$ [2]
where $\displaystyle F_s$ is the force due to the extension of the spring.
I hope the diagrams should be obvious from the above. As for the pulley the forces you have are the tension $\displaystyle T$ acting away from the pulley at each corner and reaction force diagonally outwards from the pulley (at a 45 degree angle to the horizontal).
The only force equation left is that of the spring where:
$\displaystyle \boxed{F_s = k (y- l_0 )} $ [3].
Sub [3] into [2] and you get:
$\displaystyle \boxed{m_2 a = T - k( y - l_0 )}$ [4]
and now add [1] to [4] to give you
$\displaystyle ( m_1 + m_2 ) a = m_1 g - k ( y - l_0 )$,
rearranging this and substituting for y gives us:
$\displaystyle \boxed{a = \frac{m_1 g - k (d+x -l - l_0 )}{m_1 + m_2}}$ .
Hope that was of some help!