Problem
A particle moves in a straight line $OCP$ being attracted by a force $m\mu$. $PC$ always directed towards $C$ whilst $C$ moves along $OC$ with a constant acceleration $f$; here $P$ is the position of the particle at time $t$. If initially $C$ was at rest at the origin $O$ and the particle was at a distance $c$ from $O$ moving with velocity $V$, then show that the distance of the particle from $O$ at any time $t$ is, $$\left(\dfrac{f}{\mu}+c\right)\cos \sqrt{\mu}t+\dfrac{V}{\sqrt{\mu}}\sin \sqrt{\mu}t-\dfrac{f}{\mu}+\dfrac{1}{2}ft^2$$
I have thought about this problem for quite sometime but without any progress. Actually the part the $C$ is also moving makes it very difficult for me to draw the picture.
Any help is appreciated but it will be best if a detailed solution is given, if given at all.