<s>[INST] A particle of rest mass $m_0$ moving at a speed $v_0$ in the positive x-direction relative to the laboratory frame of reference. The total energy of the particle in this frame is $$E=\frac{m_0 c^2}{\sqrt{1-\frac{v_0^2}{c^2}}}=m_0c^2\gamma$$. In the particle's rest frame, a clock is started and broadcast at time $t_0$. From the laboratory frame, we observe the particle as it passes an observer with lab clock time $T_0$, where $T_0 \ge t_0$. The clock in the moving frame is observed to run slow by a factor of $$\frac{dt}{d\tau}=\frac{1}{\gamma}$$ so that $$\frac{dT}{dt}=\frac{1}{\gamma}$$, where $\tau$ is the proper time. After the particle passes the laboratory observer, the particle encounters a photon with energy $$E_{\text{photon}}=\frac{1}{2}m_0c^2\gamma$$. The particle absorbs this photon and its speed relative to the lab frame becomes $v_f$. We can infer that $$E_f=\frac{m_0 c^2}{\sqrt{1-\frac{v_f^2}{c^2}}}=E_{\text{photon}}+E=m0c^2\gamma^2$$.[/INST]