It is the object's own (initial) kinetic energy.
The second objects provides a force against the first which decelerates it, changing (and potentially reversing) the velocity. The second object feels a force of this same magnitude, but in the opposite direction; it therefore accelerates in this opposite direction. The force is the reaction force. What determines the extend of deceleration (reaction force) which occurs, I don't know, since there can be a range of final velocities for both objects which conserve linear momentum (a basic conservation law). Because the reaction force is the same magnitude on both objects, their accelerations (=>final change in velocity) are in proportion to their masses. The change is also often assumed to be instantaneous, although in an extended object which is elastic it would happen over a span of time.
If it is a completely elastic collision, total kinetic energy is conserved, meaning the accelerations occur in such a way that the final velocities preserve the original kinetic energy. 343
That would provide a unique solution not the problem, I think, and unique final velocities. In this case, none of the energy is lost as heat (and this means the particles cannot deform inelastically when they meet).
If the collision is completely inelastic, such as when one object becomes embedded in another, total kinetic energy is not conserved. The two will move off more slowly, keeping the same total momentum as the initial body had, but this does not mean that they have same kinetic energy as the original. This can be found by looking at the kinetic energy formula, which goes with v-squared, while momentum goes with v. In this case, the energy has to be lost as heat, maybe dissipated when the objects deform.
What determines to what extent the collision will be elastic or inelastic I don't know. Given this constraint, we then either only make sure the momenta add up correctly, or make sure that both the momenta and kinetic energies before and after add up correctly.
Also, these two situations seem special as seen from the center of mass frame of the system. Specifically, in that frame the kinetic energy completely disappears in the case that the bodies coalesce, and the initial velocities completely reverse in the case that they do not. 621