If two bodies with the same kinetic energy can lose or gain their energies, why isn’t the same true for bodies with the same temperature? Suppose we have two bodies A and B lying on a horizontal table and the two bodies are going towards each other.
$m_A= m$, $ \vec v_A= -\vec v$
$m_B=2m$, $\vec v_B= \vec {\frac{v}{\sqrt{2}}}$
From the informations given, we see that the two bodies have same initial kinetic energy.
If we find the kinetic energy of the two after an elastic collision, we can notice that the body A with mass $m$ gains some more energy .
Similarly, suppose we have two large bodies with same temperature. If we bring them in contact the molecules will collide elastically with one another.
So why don't their temperature change if the energies  of the individual
molecules does change ?
Or more specifically
why isn't the same idea of energy exchange true for bodies with same temperature ?

Deriving the fact that energy will transfer (can be ignored)
So let's find the center of mass's velocity :
$$\vec v_{cm}=\frac{m_A \vec v_A+m_B\vec v_B}{m_A+m_B}$$.
$$\vec v_{cm} = \frac{2m(\vec {\frac{v}{√2}})-m(\vec v)}{3m}\Rightarrow v(\frac{√2-1}{3})$$
In center of mass's frame the velocity of A after collision is given by:
$$\vec v'_A= 2\vec v_{cm} - \vec v_A$$
So, $$\vec v'_A= 2v(\frac{√2-1}{3}) + v \Rightarrow v(\frac{2√2+1}{3})$$
Similarly
$$\vec v'_B = {2v(\frac{√2-1}{3})}-{\frac{v}{√2}}\Rightarrow v(\frac{1-2√2}{3√2})$$
So from the above derivation we see that the Energy of each of the molecules change after the head on elastic collision.
 A: In the center of mass system of two bodies, if the two bodies have a mass equal to each other and scatter elastically, the kinetic energy of each is the same, as observed in the comment.
In the statistical treatment of an ideal gas that you refer to, the masses in order to derive the temperature are all the same. So in both cases, neither the kinetic energy in your example, nor in the temperature of misxing two ideal gases at the same temperature, there is any change.
Here is a discussion about mixing two ideal gasses at the same temperature , which is  taken the same after mixing, because of energy conservation . If your two bodies have different masses , they will have different kinetic energies after scatter, but the total energy of the two body system by conservation of energy is the same , before and after. The temperature,is connected to the average kinetic energy, and the average between your two bodies should not change.
A: The temperature of a body is its average in the various (spin, magnetization,
kinetic...) energy degrees of freedom, not a simple kinetic energy value.
We measure temperature by applying a thermometer, and waiting for the
thermometer to come to  the same temperature as the sample, which
happens because of the so-called zeroth law of thermodynamics: heat
travels from the hotter of two bodies in contact, to the cooler.
When heat stops making a net  increase or decrease in the temperature of
the thermometer, that tells us the temperature of the sample is the
same as the temperature of the thermometer, and thus the temperature
of the sample-and-thermometer-probe is what the thermometer display indicates.  We can do this because the probe thermal contact does NOT
achieve a temperature difference with the sample, but converges to
the same temperature.
The effect of individual interactions is not unimportant; it gives
rise to internal fluctuations in any given speck of the system,
some of which are observable (Brownian motion is an example; the
rushing sound heard in a conch shell is another).
The microscopic picture of elements of a gas, for instance, can
have a wide range of gas molecule velocities.  Single molecules
thus do NOT have a measurable statistical property of temperature unless
we make a long-time observation and average the various wanderings
over many seconds, or apply an ergodic principle (a very useful
conceit, ergodicity: the time average is equal to the population-of-
other-molecules average).
Ergodic principles are mathematically poorly founded (the theorems
are weak  ones) but physicists use them (and sometimes call them
theorems, if no mathematicians are present).   The temperature
of a gas particle is inferred routinely from the average that
communicates from many particles slowly to a massive thermometer bulb...
