On the dynamics equations of systems of interconnected bodies