as shown in the figure. A and B have equal masses