When two or more objects move together, then it usually simplies the problem solving to treat them as a single "compound body."  The principles that apply in this case are