This is related to the inclined plane problem shown 1st on 2nd page.
The force that A imposes on the cord is F=ma
The force that B imposes on the cord is only the y component (vertical direction) of the total force that B could have provided. Since the question stated that there was no friction and the masses where the same, and a=gravity=9.8m/s^2 for both objects, I would say that the assembly slides toward A, since B doesn't have its entire weight working for it, only the y component.
That's the best decription I can give without a bunch of scribble on a drawing. [Linked Image]


Ron