You can start with an easier case: A convoy of ##n## spaceships flies past the Earth at constant speed. An observer in one of the spaceships finds that the length of each ship is ##L##, the distance between the nose of one and the tail of next is ##D##, and the total nose-to-tail length of the convoy is ##n(L+D)-D##.
An observer on Earth finds both ##N## and ##D## to be length-contracted.
It gets more complicated if the convoy "leaves the earth" instead of just passing by. In this case, each individual ship must starts out at rest on Earth and must accelerate to start moving away. In this case, the relationship between the distances between the ships will, as A.T. says, depend on how thevships synchronize their acceleration.
Google for "Bell's spaceship paradox" and check the FAQ here for more about the second, kore complex, case.