Cannon on a railroad car

A cannon on a railroad car is facing in a direction parallel to the tracks (the figure below). It fires a ball with mass m at a speed of c (relative to the car) at time t = 0. The opposite side of the car is hit by the cannon ball at time t. The length of the car (inside) is L. If the cannon plus the car have a mass M, what is the recoil speed v of the car, the distance x moved by the car and the time t ?

According to a Newtonian observer, the following formulas are valid:

  m.(c - v) = M.v
  x = v.t
  L = c.t
Known quantities are : c , m , M , L . The unknowns are : t , x , v . Hence:
  t = L/c
  v = m/(M + m).c
  x = m/(M + m).L
Example for (c - v) = v , hence v = c/2 :
  m = M
  x = L/2 
In agreement with what might be expected in this case.

Let's proceed with photons instead of cannon balls. Reference (wikipedia) is: Photon.
According to this reference, the (linear) momentum p and the energy E of a photon are mutually related as follows:

  p = E / c
Because everybody seems to adhere to relativistic mechanics these days, it becomes bit of a guesswork what Newton would have thought of this. Because, in classical Newtonian mechanics, photons do not necessarily travel with "the" speed of light c. We think a good start is to assume that the momentum and the energy of a photon, travelling with speed (c - v) now, obey the following relationship:
  p = E / (c - v)     instead of     p = E / c
If the Cannon on a railroad car model is assumed valid for photons, then it follows that:
  m.(c - v) = M.v = E / (c - v)
Conclusion:
  E = m.(c - v)2
In practice it is almost impossible to distinguish this outcome from   E = m.c2 .
Proof. It is clear that the mass of the train wagon is much greater than the mass of the photon:   M >> m .
Therefore it is concluded from the formula   m.(c - v) = M.v   that:   (c - v) >> v   →   (c - v) ≈ c  .
Note. This argument even holds if we choose not to replace the original formula  p = E/c  by  p = E/(c-v) .