In one dimension, a 5g ball is moving to the right at 7 m/s collides with an 8g ball moving to the left at 4 m/s for a perfectly elastic collision. What is the final velocity of both balls?

I just don't understand the whole left and right thing. I have already worked it out I just want to know if I am doing it right! Thanks!