The time it would take for a ship traveling at nearly the speed of light to reach another star system would depend on the distance between the two star systems as measured in the ship's frame of reference. However, due to the effects of time dilation, as the ship approaches the speed of light, time would appear to pass more slowly for the travelers aboard the ship compared to observers at rest.
Let's assume the ship is traveling at 99.9% of the speed of light (approximately 299,792,457 meters per second) and that the star system is located 10 light-years away (about 9.461 trillion kilometers). In the reference frame of the ship, the distance would be contracted due to length contraction, but for simplicity, we'll use the actual distance of 10 light-years.
Using the Lorentz transformation, we can calculate the time experienced by the travelers on the ship. The time dilation formula is:
t' = t / sqrt(1 - (v^2 / c^2))
Where: t' = ship's time (time experienced by the travelers on the ship) t = time as measured by an observer at rest (in this case, the time it takes for light to travel 10 light-years, which is 10 years) v = velocity of the ship (0.999c, or 299,792,457 meters per second) c = speed of light (299,792,458 meters per second)
Plugging in the values:
t' = 10 years / sqrt(1 - (0.999^2)) ≈ 44.73 years
According to the ship's clock, it would take approximately 44.73 years to reach the star system 10 light-years away, assuming the ship is traveling at 99.9% of the speed of light.
However, from the perspective of observers on Earth, time would pass much more quickly. Due to the time dilation effects, while the travelers experience 44.73 years, observers on Earth would see the journey take much longer. In fact, they would see the trip taking approximately 10,000 years due to the time dilation effects.