We know that the momentum is conserved on the system this will mean that:
where:
At the beginning the cars are stuck together and we can assume they are at rest; we know that after the explosion the velocity of the 1 kg car is -2 m/s; then we have:
Therefore, the velocity of the 2 kg car is 1 m/s.