According to the figure below, a wooden cuboid A of mass "M" is suspended to a horizontal fixed straight inextensible string which passes through 2 smooth rings which are attached to the wooden cuboid such the cuboid can move freely along the string. a wedge B of mass "M" is kept on a smooth horizontal plane. a ball C of mass "m" is kept on the slope face is attached to an inextensible string which passes on a pully at D and the other end is attached to the wooden cuboid, here the portion of the string AD is horizontal. also there is no friction anywhere in this system (the ball slides)
i am to show that the acceleration of the wedge B is $$\frac{(M+m\cos\alpha)mg\sin\alpha}{(M+m)(2M+m)-(M+m\cos\alpha)^2}$$ and that the tension of the string is $$\frac{(M+m(1-\cos\alpha))Mmg\sin\alpha}{(M+m)(2M+m)-(M+m\cos\alpha)^2}$$ after the system is released from the rest
my idea on approaching this question is to label the accelerations as below
such the relative velocities are (E is for earth) $$a(A,E) = \ddot xi$$ $$a(B,E) = -\ddot zi$$ $$a(C,E) = (-\ddot z + \ddot y\cos\alpha )i - \ddot y \sin\alpha j$$
but the values for the accelerations and tensions dosnt even come close to the complexity of the final answer
can anyone explain or give mean a starting point for solving this problem? did i denote the accelerations wrongly?