An object weighing m and moving with a velocity equal to v m/s has a kinetic energy given by (1/2)*m*v^2. In an inelastic collision total energy is not conserved. This can be seen in the example provided as follows.
Initially each object weighing 10 kg is moving at 20 m/s. This gives the kinetic energy of each object as (1/2)*10*20^2 = 2000 N. The total energy in the system is equal to 4000 N.
When the objects undergo an inelastic collision let us assume they stick to each other. The velocity of the body created due to this has two perpendicular components of velocity equal to each other. The magnitude of each component from the law of conservation of momentum is (10*20)/20 = 10 m/s. The magnitude of the resultant velocity of the final body is sqrt(10^2 + 10^2) = sqrt(200) m/s
An object weighing 20 kg and moving at this velocity has a kinetic energy equal to (1/2)*20*200 = 2000 N.
The total energy in the system initially was 4000 N but after the collision it is reduced to 2000 N. This shows that total energy is not conserved in an inelastic collision.