We will have the following: since the collision is perfectly elastic then:
Now, we know that in an elastic collision the bodies won't have a net transfer of energy and the directions will be opposite but with the same magnitude:
So, the final velocities are:
10 kg object will have a final velocity of -2 m/s. And the 2 kg object will have a final velocity of 4m/s.
[We are assuming that the directions are positive for the initial direction of the 10 kg object and the 2kg mass initial velocity marks the opposite direction]