Contradiction of total energy of a system? I consider a situation in a system in which an observer is sitting in body of mass $M$ and another observer in a body of mass $2M$, both moving with velocity $v$ towards each other. If observers in each body consider themselves at rest and the other one is in motion, total energy calculated by the first observer is $\frac{2M(2v)^2}{2}$ but for the second observer it is $\frac{M(2v)^2}{2}$ which is half of the first. How am I getting different total energy of system at same instant? 
 A: Kinetic energy is not reference-frame-independent, as you are observing now. Instead, the total energy of the two is related by an additive constant which doesn't physically do anything (just like adding a constant term to the potential energy has no physical ramifications).
A helpful example
It helps to work out an example which contains a common fallacy (a fallacy so common that the Mythbusters committed it in one episode and got so many complaints that they tested it in another, proving the doubters right!). This is the "a car crashes into a fixed-to-the-ground immobile wall; the car is moving at velocity $+v$ relative to the ground. Would it sustain more damage if it, still moving at $+v$ relative to the ground, crashes into an identical oncoming car moving at $-v$ relative to the ground?" scenario. Let $K_0 = \frac12mv^2$ be the energy that the car crashing into the wall must dissipate to come to a complete stop.
The answer from the ground frame is a clear "no!". The total kinetic energy is $2K_0$ which gets evenly distributed into crushing either car, so each car must absorb $1K_0,$ exactly the same as crashing into an immovable, unbreakable wall.
The common fallacy occurs when we switch into the one car's reference frame, where the relative velocity is $-2v$, calculate the total kinetic energy as $\frac12 m (-2v)^2 = 4K_0$, and distribute it among the cars evenly, so they each must dissipate $2K_0$, which should presumably lead to more carnage. The error here is to neglect the final kinetic energy of the two cars: in this particular reference frame both cars travel off with velocity $-v$ after the crash, which costs $\frac12(2m)(-v)^2=2K_0$ kinetic energy. So we're not evenly distributing $4K_0$ among the two cars, but rather initial minus final, or $4 K_0 - 2 K_0=2K_0.$ Therefore, in this reference frame each car must also dissipate $K_0$ and we see the exact same carnage.
A helpful proof
In Newtonian mechanics, everyone agrees on forces, masses, times, and changes of velocity. Let me define the symbol $\Delta$, greek capital "delta" for "difference", as $\Delta A = A_1 - A_0$ for how a thing changes between two times $t_0, t_1$. Given a constant force $F$ that acts over this time difference $\Delta t$ on a mass $m$, it produces the change in velocity $\Delta v = v_1 - v_0 = F~\Delta t/m.$
The change in kinetic energy we can write as $$\Delta K = \frac12m\Delta(v^2) = \frac12m(v_1^2 - v_0^2) = m~\frac{v_0 + v_1}2 (v_1 - v_0),$$ because it contains a difference of squares $a^2 - b^2 = (a - b)(a + b).$ Defining the average velocity over this short time as $\bar v = (v_0 + v_1)/2$ we see that $\Delta K = m~\bar v~\Delta v.$
Combining this with the previous result we get $\Delta K = m \bar v (F \Delta t / m) = F~\bar v~\Delta t,$ and the product of the average velocity with a time difference is just a position difference as $\bar v = \Delta x / \Delta t.$ So we get the so-called work-energy theorem $\Delta K = F~\Delta x.$
Now consider two particles of masses $m, M$ interacting this way. We know that everyone sees them exert equal and opposite forces on each other, but they might travel for different distances $\Delta x, \Delta X$. The total change in kinetic energy is therefore $F \Delta x - F \Delta X.$ This might be positive, negative, zero, whatever. Conservation of energy occurs when we can define a "potential energy" which exactly balances this change out; we think (as a law of physics) that we can always do so.
Now if we add a velocity $u$ onto both of these particles, switching into a new reference frame, we see that $\bar v \mapsto \bar v + u$ while $\Delta t$ stays the same, hence they both travel an extra distance $\Delta x' = \Delta x + u~\Delta t.$
However, we see that the force balance gives just $$F~\Delta x' - F~\Delta X' = F~(\Delta x + u~\Delta t) - F~(\Delta X + u~\Delta t) = F~\Delta x - F~\Delta X,$$ so the additional kinetic energy of each of them cancel out when we want to evaluate the change-of-total-kinetic-energy. So when summed over all of the particles, we see that the total kinetic energy is the same up to a constant.
