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: (E, p_x c, p_y c, p_z c)
If we need to deal only with x-components, the Lorentz transformation for time and position looks like this:
ct^\prime = \gamma (ct - \beta x)
x^\prime = \gamma (x - \beta ct)
For energy and momentum:
E^\prime = \gamma (E - \beta p_x c)
p^\prime_x c = \gamma (p_x c - \beta E)
where as usual \beta = v / c and
\gamma = \frac{1}{\sqrt{1 - v^2 / c^2}} = \frac{1}{\sqrt{1 - \beta^2}}
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
E^\prime = \gamma (E - \beta E)
E^\prime = \gamma (1 - \beta) E
E^\prime = \sqrt {\frac {1 - \beta}{1 + \beta}} E