The momentum before and after the collision is the same regardless of how they collide. The initial momentum is 800 kg x 20 m/s + 1200 kg x 10 m/s = 16,000 + 12,000 = 28000 kg m/s.
when they stick together they have a combined mass of 2000 kg. Using conservation of momentum
2000 x velocity = 28000 there fore the final velocity of the two will be 14 m/s