Constant acceleration: Two particles P and Q have masses 0.5kg and 0.4kg respectively. The particles are attached to the ends of a light inextensible spring. [cont]...?

Two particles P and Q have masses 0.5kg and 0.4kg respectively. The particles are attached to the ends of a light inextensible spring. The string passes over a small smooth pulley which is fixed above a horizontal floor. Both particles are held, with the string taut, at a heigh of 2m above the floor, as shown. The particles are released from rest and in the subsequent motion Q does not reach the pulley.

a) write down an equation of motion for P. Write down an equation of motion for Q
b) find the tension in the string immediately after the particles are released
c)Find the acceleration of P immediately after the particles are released.
d) When the particles have been moving for 0.2s, the string breaks. Find the further time that elapses until Q hits the floor.
enter image source here

Even just an explanation of what's going on here would help. Thanks!