According to the theory of relativity, as an object approaches the speed of light, time dilation occurs. This means that time passes more slowly for the moving object relative to the stationary observer.
If you were to travel at the speed of light for 2 years (from your reference frame), an observer on Earth would experience time passing at a different rate due to this time dilation effect. However, it is important to note that according to our current understanding of physics, it is not possible for an object with mass, such as a human, to travel at the speed of light.
Nevertheless, for the sake of the hypothetical scenario, let's assume you somehow managed to travel at the speed of light for 2 years. From your perspective, time would appear to pass normally, so you would perceive that 2 years have elapsed.
However, for your friends on Earth, time would have passed more quickly due to the time dilation effect. The exact calculation depends on the Lorentz factor, which is given by:
γ = 1 / sqrt(1 - (v^2 / c^2))
where v is the velocity and c is the speed of light.
If we substitute v as the speed of light (which is approximately 3 x 10^8 meters per second) and calculate the Lorentz factor, we get:
γ = 1 / sqrt(1 - (c^2 / c^2)) γ = 1 / sqrt(1 - 1) γ = 1 / sqrt(0) γ = 1 / 0 (undefined)
At the speed of light, the Lorentz factor becomes infinite, resulting in time dilation to an infinite extent. This means that from your perspective, an infinite amount of time would pass on Earth. However, it is important to note that this scenario is not physically possible within our current understanding of the laws of physics.
Therefore, in this hypothetical scenario, your friends on Earth would have experienced an infinite amount of time passing when you return, which is not possible in reality.