Energy and momentum transform between different inertial reference frames exactly the same way as time and position, via the Lorentz transformation.
The time-position four-vector: (ct, x, y, z)
One way to write the energy-momentum four-vector: [itex](E, p_x c, p_y c, p_z c)[/itex]
If we need to deal only with x-components, the Lorentz transformation for time and position looks like this:
[tex]ct^\prime = \gamma (ct - \beta x)[/tex]
[tex]x^\prime = \gamma (x - \beta ct)[/tex]
For energy and momentum:
[tex]E^\prime = \gamma (E - \beta p_x c)[/tex]
[tex]p^\prime_x c = \gamma (p_x c - \beta E)[/tex]
where as usual [itex]\beta = v / c[/itex] and
[tex]\gamma = \frac{1}{\sqrt{1 - v^2 / c^2}} = \frac{1}{\sqrt{1 - \beta^2}}[/tex]
and v is the relative velocity of the two frames.
For a photon, E = pc, so the Lorentz transformation for the one-dimensional case becomes
[tex]E^\prime = \gamma (E - \beta E)[/tex]
[tex]E^\prime = \gamma (1 - \beta) E[/tex]
[tex]E^\prime = \sqrt {\frac {1 - \beta}{1 + \beta}} E[/tex]