I understand how to approach the question:
Apply the conservation of momentum, and use the fact that the ratio of the difference in speeds before and after is e. And then it's simple rearranging and substitution.
However, it's important to get the directions of A and B after the collision correct. According to the mark scheme of the question, B also changes direction, thus meaning the speed of separation after the collision would be $y + x$, where $y$ is the speed of A, and $x$ is the speed of B.
But, how is one to assume this from the question given? Why can't B continue moving in the same direction (therefore meaning the speed of separation would be $y-x$ or $x-y$, since they'll both be in the same direction.)?
So my question is, how do you tell which way two objects will travel after they collide, when given their masses and speeds?
EDIT: I previously used the wrong question. In this question, both A and B are moving.