Isaac Newton observed the actions and reactions of objects in motion and recorded his observations as three famous laws. These laws (plus the conservation of momentum and of energy) can be used to explain how momentum and velocity are distributed among the objects coming out of a collision:
(1) An object in motion will remain in motion with the same speed and in the same direction unless a net force acts upon it. Likewise, an object at rest will remain at rest unless a net force acts upon it.
(2) When a net force acts upon an object, the object will accelerate with a change of its speed, of its direction, or of both. The more massive the object, the greater will be the amount of net force required to accelerate it.
(3) Every action will produce an equal and opposite reaction.
If two balls collide in mid-air, either of two possibilities may result: (1) All their kinetic energy may remain kinetic and remain within the two-ball system, or (2) some of their kinetic energy may be converted to other forms of energy, such as potential energy, internal energy, heat, sound, etc. The first possibility is an elastic collision. The second possibility is an inelastic collision.
In the real world, no collision is perfectly elastic. But for our purposes, to keep things simple, let's assume that two baseballs collide head-on and bounce off of each other. We will ignore the loss of kinetic energy to noise and deformation of the baseballs. Prior to the collision, each ball had velocity, which is a vector consisting of speed and direction, and each ball had momentum, which is another vector consisting of the product of the ball's mass with its velocity.
At the instant of impact, a net force acted upon each ball. As we are assuming a perfectly elastic collision, all the kinetic energy of the system remained kinetic and remained within the system. A baseball weighs 145 grams (0.145 kg). Let's set up equations to track and account for what happened:
Ball 1's velocity: V1 = 30 meters per second
Ball 1's Momentum: M1 = 0.145 kg * 30 mps = 4.35 kg m/s
Ball 2's velocity: V2 = 40 meters per second
Ball 2's Momentum: M2 = 0.145 kg * 40 mps = 5.8 kg m/s
The kinetic energy (http://hyperphysics.phy-astr.gsu.edu/hbase/ke.html) of each ball before the collision was:
Ball 1's kinetic energy: KE1 = 1/2 * 0.145 kg * (30 mps)^2 = 65.25 joules
Ball 2's kinetic energy: KE2 = 1/2 * 0.145 kg * (40 mps)^2 = 116 joules
As the balls hit head-on, their trajectories reverse 180 degrees when they bounce off each other in an elastic collision. Both the energy and the momentum of the system must be conserved in the collision, as they are conserved quantities (they can be neither created nor destroyed in a closed system). What goes into the collision must come out of the collision. Scroll to the last box in this link for an explanation of why this must be so: http://hyperphysics.phy-astr.gsu.edu/hbase/elacol.html.
Newton's 1st law of motion tells us that each ball's trajectory stops and reverses in the collision. Going into the collision, each ball's momentum differs, as does their kinetic energy. How is the energy and momentum distributed between the balls coming out of the collision?
Per Newton's 3rd law, the force exerted by B1 on B2 must be opposed by an equal and opposite force exerted by B2 on B1. As there is one instantaneous collision, the momentum coming out is divided equally between the two balls, which I will show below. Coming out of the collision, because their momenta and masses are equal, both velocities must be equal. Here is another way to explain the process: http://scienceblogs.com/dotphysics/2008/12/12/basics-collisions-interactions-between-two-objects/. The link uses the concept of forces involved in the collision to illustrate the change in momentum of each object.
In our example above, according to Newton's 2nd law:
Change in momentum of B1 = ∆M1 = Net Force applied by B2 * time applied
Change in momentum of B2 = ∆M2 = Net Force applied by B1 * time applied
As the net forces applied by each to the other become the same force at the instant of impact, we can say that B1 net force = minus B2 net force (Newton's 3rd law). Or, as the two balls have the same magnitude of force acting on them for the same instant of time, the change in their momentum must also be the same, but with reversed signs.
In our example above:
Total momentum of the system = 4.35 kg m/s + 5.8 kg m/s = ~10.2 kg m/s
As ∆M1 = -∆M2, and as momentum must be conserved between the two balls in this perfectly elastic collision, each ball must leave the collision with 1/2 * 10.2 kg m/s = 5.1 kg m/s magnitude of momentum. Their velocities are the same, because the mass of each is the same. But if the mass of one were greater than the other, the velocity of the more massive must be smaller than the less massive in order to make their momenta equal.
Likewise, kinetic energy is conserved between the two balls in this perfectly elastic collision, so each leaves the collision with 65.25 joules + 116 joules = ~181 joules / 2 = ~90 joules of kinetic energy.
In the real world, no collision is perfectly elastic, so this example is an ideal simplification.