I am working through an old mechanics textbook for UK A-level (1970s/80s) and am having difficulty with following problem, which is from an old A-level paper. I have managed to solve the first part of the question, but am floundering on the second and third parts. Help please!

This is the first part of the question:

A particle moves on a straight line so that its distancesfrom a fixed point of the line is given bys =bsinkt, wheretis the time andb, kare constants. Prove that its velocityvat any point is given byv^{2}=k^{2}(b^{2}-s^{2}).

and here is my answer:

s = b sin kt so ds/dt = v = bk cos kt

cos kt = v/bk, so sin^{2}kt = 1 - v^{2}/ b^{2}k^{2}= (b^{2}k^{2}- v^{2}) / b^{2}k^{2}

Therefore

s^{2}/b^{2}= (b^{2}k^{2}- v^{2}) / b^{2}k^{2}so k^{2}s^{2}= b^{2}k^{2}- v^{2}i.e. v^{2}= k^{2}(b^{2}- s^{2})

Here are the second and third parts of the question, where I need help:

Particles A and B move along a straight line, each starting from a point O with velocityu. A is acted on by a constant force directed towards O, and B by a force, also towards O, proportional to the distance from O.

(i) If they both cover the same distanceLbefore starting back towards O, show that the times taken t_{A}and t_{B}respectively, are in the ratio 4 : pi, and that their velocities as they pass a point distantsfrom O are in a ratio given by

v_{A}^{2}: v_{B}^{2}=L: (L+s)

(ii) If they both take the same timeTbetween leaving O and returning to O, show that their maximum distances from O are in a ratio given by

L_{A}:L_{B}= pi : 4

I have tried using F=ma and integrating the expressions for acceleration with respect totand with respect tos, but I can't get to the ratios stated, particularly with the time expressions.

Any help much appreciated.