An alternative method for solving this problem, and one which I much prefer over Lorentz contraction and time dilation, is invariance of the interval.
The key concept in special relativity is invariance of the interval.
The first thing to do is to indentify the key events. In this case, key event 1 is the coincidence of the rocket and the Earth, and key event 2 is the coincidence of the rocket and planet X.
There are 2 frames of reference - the frame of reference of the Earth and planet X, and the frame of reference of the rocket. Arbitrarily label one of the frames as unprimed and one as primed - it doesn't matter which is which. Take, as you do, the Earth-X frame as the unprimed frame.
In the Earth-X frame, the spatial distance between the 2 key events is \Delta x = 12, and the elapsed time between the events is \Delta t = \Delta x/v since \Delta x = v \Delta t.
In the rocket's frame, the spatial distance between the 2 key events is \Delta x' = 0 since the rocket is coincident with both events, and the rocket doesn't move in its own frame. The elapsed time between the events is \Delta t' = 7.
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,
\left( \Delta x \right)^2 - \frac{\left( \Delta x \right)^2}{v^2} = - \left( \Delta t' \right)^2.
Solve for v, and plug in the numbers.
In the above I have used c = 1 lightyear / 1 year = 1.
I feel that time dilation should be introduced via the light clock (after clock sychronization) before the invariance ot the interval, but at that point, time dilation should not emphasized as a method of problem solving. Then invariance of the interval should be introduced. After students are comfortable using invariance of the interval to solve problems, then time dilation and Lorentz contraction, and the circumstances under which they apply, should be explained carefully. Only then (and maybe not even then) should they be used as problem solving techniques.
This is the way topics are covered in Thomas Moore's wonderful little book A taveler's Guide to Spacetime: an Introduction to the Special Theory of Relativity.
mewmew said:
the part I don't get I guess is why it doesn't work with time dilation also.
The fact that, in one of the frames, the spatial distance between the key events is zero shows that time dilation is very appropriate. In fact, \Delta t = \gamma \Delta t', which is the other way around from what you wrote. Use this together with the spatial displacements and elapsed times that I listed above, and the problem can be solved without invaiance of the interval.
Maybe this is more detail than you wanted.
Regards,
George