Arman777 said:
Let us suppose a spaceship moving from Earth to another star that is 10ly away with a speed of 0.99c.
Like
@Nugatory and
@Dale, I prefer Lorentz transformations over a rote application of the time dilation formula, which I find too easy to screw up. I also like a method that uses invariance of the spacetime interval, which I think is the key concept in relativity.
In these methods, the first thing to do is to identify the key events. In this case, key event 1 is the coincidence of the spaceship and the Earth, and key event 2 is the coincidence of the spaceship and the star.
I think that a lot of students' problem are caused by failure to identify clearly spacetime key spacetime events for a particular problem.
There are two frames of reference - the frame of reference in which the Earth is at rest, and the frame of reference of the spaceship. Arbitrarily label one of the frames as unprimed and one as primed - it doesn't matter which is which. In what follows, I label the Earth's frame as the unprimed frame, and the spaceship's frame as the primed frame.
In the Earth's frame, the spatial distance between the two key events is ##\Delta x =10##, and the elapsed time in the Earth's between the events is ##\Delta t = \Delta x/v##, as in a).
In the spaceship's's frame, the spatial distance between the two key events is ##\Delta x' = 0##, since the spaceship is coincident with both events, and the spaceship doesn't move in its own frame. The elapsed time In the spaceship's's frame between the events is ##\Delta t'##.
Invariance of the spacetime interval, a fundamental property of spacetime, gives
$$\left( \Delta x \right)^2 - \left( \Delta t \right)^2 = \left( \Delta x' \right)^2 - \left( \Delta t' \right)^2 .$$
From the above, the elapsed time in the spaceship's frame is
$$ \begin{align}
\left( \Delta t' \right)^2 &= \left( \Delta x' \right)^2 - \left( \Delta x \right)^2 + \left( \Delta t \right)^2 \nonumber \\
&= 0^2 - \left( \Delta x \right)^2 + \left( \Delta x/v \right)^2 \nonumber \\
&=\left( \Delta x \right)^2 \left( \frac{1}{v^2} - 1 \right) \nonumber .
\end{align}$$