A question in Special Relativity In books the equation for length contraction is derived by supposing that the velocity of the spacecraft is the same for both observers. So the question is that, is the velocity really the same for both observers? Whereas there must be some trouble in the velocities noted by observers. I mean: If the observer on the spacecraft measures the velocity of the spacecraft to be $v$ then is it possible for the other observer to measure the same velocity from the Earth?

 A: Further to udrv's answer, and, the technicalities he raises aside, there are two ways to argue the reciprocity relationship that the boost from observer $A$ to $B$ is the boost from $B$ to $A$ but with $v\mapsto-v$. 
By the detailed arguments in the afterword, we find that the transformations between inertial frames form a group and that group acts linearly on affine co-ordinate (roughly, that Lorentz transformations must be a matrix group acting on column vectors of Cartesian / Minkowski spacetime co-ordinates). This follows from Galileo's relativity principle, continuity of transformation and homogeneity of spacetime assumptions.
So now we assume isotropy of space and consider the subgroup of boosts in one direction. By spatial isotropy, fix the $x$ axis to be this direction. Then it follows that our group of co-linear boosts is of the form:
$$\mathfrak{L}=\{\exp(\eta\,K)|\,\eta\in\mathbb{R}\}\tag{1}$$
for some constant $2\times 2$ matrix that characterizes the basic nature of the boost phenomenon, where the members of $\mathfrak{L}$ act on $2\times 1$ column vectors of the form $\left(\begin{array}{c}t\\x\end{array}\right)$.
There are now two different assumptions that will lead you from (1) to the reciprocity relationship:

Argument 1
We invoke spatial isotropy again and consider what happens when we make the co-ordinate transformation $x\mapsto-x$. Spatial isotropy demands that the matrix $K$ in (1) must be the same; only the rapidity parameter can $\eta$ can change; say it is $\eta^\prime=h(\eta)$ in the transformed co-ordinates, where $h()$ is a function whose character we must find. On making the co-ordinate transformation $x\mapsto-x$ we find:
$$\begin{array}{cl}&\left(\begin{array}{cc}1&0\\0&-1\end{array}\right)\exp\left(\eta\left(\begin{array}{cc}\kappa_{t\,t}&\kappa_{t\,x}\\\kappa_{x\,t}&\kappa_{x\,x}\end{array}\right)\right)\left(\begin{array}{cc}1&0\\0&-1\end{array}\right)\\=&\exp\left(\eta\left(\begin{array}{cc}\kappa_{t\,t}&-\kappa_{t\,x}\\-\kappa_{x\,t}&\kappa_{x\,x}\end{array}\right)\right)\\ =& \exp\left(h(\eta)\left(\begin{array}{cc}\kappa_{t\,t}&\kappa_{t\,x}\\\kappa_{x\,t}&\kappa_{x\,x}\end{array}\right)\right);\;\forall\,\eta\in\mathbb{R}\end{array}\tag{2}$$
From this equation we deduce that $\kappa_{x\,x}=\kappa_{t\,t}=0$ and that $\eta^\prime = h(\eta) = -\eta$ (the other possibility $\eta^\prime=\eta$ gives a diagonal $K$ matrix, which does not describe relative motion). This leaves the following as the basic form of the transformation:
$$T(\eta) = \left(\begin{array}{cc}\cosh\left(\eta\sqrt{\kappa_{t x}\,\kappa_{x t}}\right)&\sqrt{\frac{\kappa_{t x}}{\kappa_{x t}}}\sinh\left(\eta\sqrt{\kappa_{t x}\,\kappa_{x t}}\right)\\\sqrt{\frac{\kappa_{x t}}{\kappa_{t x}}}\sinh\left(\eta\sqrt{\kappa_{t x}\,\kappa_{x t}}\right)&\cosh\left(\eta\sqrt{\kappa_{t x}\,\kappa_{x t}}\right)\end{array}\right)\tag{3}$$
Some further algebra "calibrating" the form in (3) in terms of the signed distance over time velocity $v$ shows that:
$$v = \sqrt{\frac{\kappa_{x t}}{\kappa_{t x}}} \tanh\left(\eta\sqrt{\kappa_{t x}\,\kappa_{x t}}\right)\tag{4}$$
Now to derive the transformation from $B$ to $A$ in terms of that from $B$ to $A$, you clearly find the inverse transformation, and from (1) this means finding the transformation with a sign change in rapidity ($\eta\mapsto-\eta$). But, from (4), this is the same as changing the sign of $v$.

Argument 2
You can also derive the form (3) and (4) and hence the reciprocity relationship by beginning with (1) and making the assumption that the inverse transformation is the same as the transformation that we get when we make the co-ordinate transformation $t\mapsto-t$. This is the same as saying that "running time backwards" corresponds to "running a movie of relative motion backwards". You then write down almost exactly the same equation as in (2), but now you know at the outset (i.e. by assumption) that $h(\eta) = -\eta$. The form of (4) and the reciprocity relationship then follow as before.
If you think about it, this is exactly the same as arguing an "isotropy of time": that the direction of time shouldn't affect the form of the boost matrix. Hence, from this standpoint, it is almost the same argument as argument 1.

Reference
Another good paper, further to the one cited in udrv's answer, on this stuff is:
Jean-Marc Lévy-Leblond, "One more derivation of the Lorentz transformation", Am. J. Phs. 44

Afterword: Why a Matrix Group Acting Linearly


*

*Galileo's Principle shows that transformations between inertial frames form a group. From Galileo's relativity principle, one can argue that the set of transformations $\mathscr{T}$ between inertial frames together with transformation composition $\circ$ together form a group $(\mathscr{T},\,\circ)$. This is because the transformation between two inertial frames can only depend on the relative motion between those two frames and not on their putative motion referred to anything else (this is in line with the Allegory of Salviati's Ship). Therefore, the composition of several boosts can only depend on the beginning and ending point, it cannot in particular depend on how the boosts are bracketted, so transformation composition must be associative. If you further assume that transformation composition cannot destroy information - that a description from frame $B$ can be calculated from frame $A$ and contrariwise, then the transformations between inertial frames are invertible. Therefore, $(\mathscr{T},\,\circ)$ is a group;

*Homogeneity of Spacetime shows that the group acts linearly on affine spacetime co-ordinates Homogeneity of spacetime together with suitable flatness assumptions then shows that when you specialize your co-ordinates to affine ones (essentially Cartesians without the notion of angle or orthogonal), then the action of our group $(\mathscr{T},\,\circ)$ must be a linear action: let $Y=f(T\,X)$ stand for: "the affine spacetime co-ordinate vector $Y$ is the image of the affine spacetime co-ordinate vector $X$ under the action $f$ of transformation $T\in\mathscr{T}$ on affine co-ordinates". Homogeneity says that our transformations cannot change form when we translate our co-ordinates either in space or time: "Nature doesn't care where we put our origin". So, for any transformation $T\in\mathscr{T}$, any spacetime co-ordinate vector $X$ and any displacement $Z$ in space and time, we must have $f(T,\,X+Z)-f(T,\,Z) = f(T,\,X)-f(T,\,0)$: the vector joining the images of the origin $0$ and $X$ is unchanged if both ends are translated by the shift $Z$. If you now define $h_T(U) = f(T,\,U)-f(T,\,0)$, you can quickly show that $h_T(X+Y)=h_T(X)+h_T(Y)$ for any affine spacetime co-ordinates $X,\,Y$. This is the famous Cauchy Functional Equation in $\mathbb{R}^{3+1}$ and you can show that the only continuous solution is $h_T(X) = A_T\,X$, for some $4\times4$ matrix $A_T$ characterizing the co-ordinate transformation. 
A: Your question seems to be: if the observer on Earth sees the spaceship moving at velocity v, how do we know that the observer on the spaceship will see Earth moving at velocity -v? 
This is known as the "reciprocity principle" problem and it is a good one, in the sense that it raises the following issue: "Does the reciprocity principle follow from the basic postulates of special relativity or is it extraneous, something assumed but not accounted for in the postulates?" 
The problem has been long debated and a generally accepted answer is that "reciprocity follows from the principle of relativity and the fundamental assumptions on the isotropy and homogeneity of space". However intuitive or believable this sounds, a detailed proof of this conclusion is not quite simple. To see why, check out the following paper on this exact topic: 
V. Berzi, V. Gorini, "Reciprocity Principle and the Lorentz Transformations", J.Math.Phys.10, 1518-24 (1969) (pdf, not on the JMP site) 
It is just one of many, but will give you a good idea about what is involved. 
A shortcut answer to your question, and probably not a very satisfying one, would be: given that length and time units are the same for the two observers, and that space has the same properties at every point along every direction (homogeneous and isotropic), the principle of relativity tells us that if observer A sees observer B moving with velocity v, then observer B must see A undergoing the same kind of motion in the opposite direction. Therefore B must see A moving at velocity -v.  
A: I think udrv's answer hits the nail on the head, but I'll expand a little bit on the intuitive way to look at it.
In your example, you have a ship leaving earth flying towards Neptune at relativistic speed.   While you might think that the ship is moving fast and the Earth is essentially still (though in truth, the Earth is moving around the sun and around the Milky way and the Milky way itself is moving, and special relativity didn't handle changing velocity at all, but, we can ignore that for now).   Here's the thing.  One object moving and one staying still isn't how you should look at things in special relativity.    To the Earth, the ship is moving away at lets say 1/2 the speed of light and by definition, to the ship, the Earth is moving away at 1/2 the speed of light.   In a 2 body system (Earth and Ship), neither can see the other moving away faster than the other sees it moving away, because, in simplest terms, in a 2 body system, either one could be moving.   They are in mirrored situations relative to each other.  
What changes is the perception of Neptune cause Earth sees Neptune as still relative to the Earth (ignoring orbital velocity of-course), but the ship sees both Earth and Neptune as moving, so their perception of Neptune is what's different.
There's two scenarios, one, Earth and Neptune are moving from the space ship's reference, earth away from the ship, Neptune towards it, or, scenario two, Earth and Neptune aren't moving and only the ship is moving.   Both scenarios work.
If the ship is moving, space before it is squashed so the distance between Earth and Neptune is reduced.   If Earth and Neptune are both moving at the same speed, the observed distance to Neptune from the Earth is what you'd normally expect.   
If you think of slowing down the clock, it's natural to think the velocity would appear higher, but the slowing down the clock corresponds with the squashing over the distance not the increasing of apparent velocity.
Now, if you look at the problem of "which time frame is right", well, they both are, though they perceive things differently.   This image kind of explains what's going on.

(Source)
The fact that both the Earth and the Ship see the other's clock moving slowly is a bit of a paradox, that's explained in the link.
The really short answer to your question is, textbooks are usually right.   Very occasionally you'll find one with an error, like if it's been printed in Texas on the subject of alternate ideas to evolution ;-) but generally, textbooks are correct.
It's a good question though.
