You break down the path into units of constant-velocity motion, but you use a
single inertial frame to calculate how much time elapses on both the traveling clock and the Earth clock during each unit. No, because again, different inertial frames define simultaneity differently. At the instant of turnaround in the traveling twin's outbound rest frame, the time on Earth might be 2010; but at the instant of turnaround in the traveling twin's inbound rest frame, the time on Earth might be 2020. So, you'd get the wrong answer if you tried to figure out the total time elapsed on Earth between departure and return by saying something like "the ship left Earth in 2005, and in the outbound rest frame only 5 years passed on Earth between the moment of departure and the moment of turnaround, then in the inbound rest frame only 5 more years passed on Earth between the moment of turnaround and the moment of return to earth, therefore Earth's clock will read 2015 at the moment of return." This would miss the discontinuous gap between the Earth's time at the moment of turnaround in the outbound frame and the Earth's time at the moment of turnaround in the inbound frame, due to the two frames defining simultaneity differently--because of this gap, the actual time when the ship returned would be 2020 + 5 = 2025, not 2015 as in the naive calculation. If you stick to a single inertial frame for adding each segment you won't run into this sort of problem. OK, let's say our ship departs Earth and travels at 0.6c for 10 years in the Earth's frame, then turns instantaneously and travels back at 0.6c for another 10 years in the Earth's frame. In the Earth's frame, the time dilation factor is \sqrt{1 - 0.6^2} = 0.8, so the traveling twin's clock will only tick (10 years)*(0.8) = 8 years during the outbound leg, and (10 years)*(0.8) = 8 years during the inbound leg, so when they reunite the Earth's clock will show 20 years have elapsed while the ship's clock only shows 16. Note that both the 10 years and the 0.8 time dilation factor were calculated solely from the perspective of the Earth's inertial frame.
Now let's analyze the problem in a different inertial frame--the frame where the traveling twin is at rest during the outbound leg. In this frame, the Earth will be moving away at a constant speed of 0.6c, while the ship will first be at rest for 8 years, during which time the Earth has moved away a distance of (8 years)*(0.6c) = 4.8 light years, and its clock has advanced by (8 years)*(0.8) = 6.4 years, while the ship's clock has advanced forward by 8 years since it is at rest. Then after 8 years the ship will accelerate instantaneously, and using the
velocity addition formula we know its speed in this frame after acceleration will be (0.6c + 0.6c)/(1 + 0.6^2) = 1.2c/1.36 = 0.88235c. Since the Earth is 4.8 light years away but only moving at 0.6c, the time for the ship to catch up can be found by solving for t in 4.8 + 0.6t = 0.88235t, which gives t = 17 years in this frame. During this time, the Earth's time dilation factor will still be 0.8, while the ship's will be \sqrt{1 - 0.88235^2} = 0.4706, so the Earth's clock will have advanced forward by (17 years)*(0.8) = 13.6 years while the ship's clock will have advanced forward by (17 years)*(0.4706) = 8 years. So, by the time the ship catches up to the earth, the Earth's clock will have advanced forward by the 6.4 years of the outbound leg plus the 13.6 years of the inbound leg, while the ship's clock will have advanced by the 8 years of the outbound leg plus the 8 years of the inbound leg. So, we find that the Earth's clock had advanced 20 years while the ship's clock has advanced only 16, just as we found in the Earth's frame.
We could also analyze everything from the point of view of the frame where the ship is at rest during the
inbound leg. This will just be the mirror image of how things looked in the outbound rest frame--during the outbound leg, the Earth is moving at 0.6c while the ship is moving at 0.88235c in the same direction, which lasts for 17 years, then the ship instantaneously accelerates and comes to rest while the Earth continues to approach it at 0.6c from a distance of 4.8 light years, catching up to it after 8 years in this frame. And again, in a mirror image of the analysis in the outbound rest frame, the ship's clock elapses (17)*(0.4706) = 8 years during the outbound leg and (8)*(1) = 8 years in the inbound leg, while the Earth's clock elapses (17)*(0.8) = 13.6 years in the outbound leg and (8)*(0.8) = 6.4 years in the inbound leg, so you again predict the ship's clock elapses a total of 16 years while the Earth's clock elapses a total of 20 years.
Now look what would happen if you tried to switch frames in mid-problem, without worrying about simultaneity issues. Start out using the outbound rest frame during the outbound leg, and you'll conclude that at the moment before the ship does its instantaneous acceleration, the ship's clock reads 8 years and the Earth is 4.8 light years away, its clock reading 6.4 years. Now if you switch to the inbound rest frame, and you don't realize that because of the different definition of simultaneity the Earth should "jump" to reading 13.6 years, then you'll mistakenly continue to think that at the beginning of the inbound leg the Earth's clock reads 6.4 years, and since the inbound frame says the ship is at rest during the inbound leg while the Earth is approaching it at 0.6c from 4.8 light years away, in the inbound frame the ship's clock must advance by 8 years during the inbound leg and the Earth's clock must advance by (8)*(0.8) = 6.4 years, so you would conclude the Earth's clock only read 6.4 + 6.4 = 12.8 years when the ship returned? But this answer contradicts the answer you get when you stick to a single inertial frame throughout the problem, whether the Earth rest frame, the inbound rest frame or the outound rest frame; you get the wrong answer if you try to "patch together" different frames in mid-problem this way, without taking into account discontinuous jumps in clock time due to the frames defining simultaneity differently. Although the time dilation factor
as measured in a given inertial frame is only a function of a clock's speed in that frame, not its velocity, a frame can only qualify as "inertial" in the first place if it is moving at constant velocity, not just constant speed. So even though the instantaneous acceleration means the traveling twin never changed speeds in the Earth's inertial frame (although he did change speeds in every other inertial frame, like the outbound rest frame), he did not stay at rest in a single inertial frame throughout the journey.
Analyzing the triplets problem wouldn't differ much from the twins problem. Let's again assume that in the Earth's frame, the two traveling triplets move at 0.6c, and turn around after 10 years. In the Earth's frame, each traveling triplet ages (10 years)*(0.8) = 8 years during their outbound legs, and another 8 years during their inbound legs, so that they have both aged 16 years when they return while the Earth twin has aged 20 years.
Now look at things from the perspective of an inertial frame where one of the triplets is at rest during the oubound leg. In this frame, for the first 8 years this triplet (call him A) will be at rest, while the earth-triplet (call him B) is moving away at 0.6c and the third triplet (call him C) is moving away at (0.6c + 0.6c)/(1 + 0.6^2) = 0.88235c. Since C's clock is ticking slow by a factor of 0.4706 in this frame, and he won't accelerate until 8 years have passed on his own clock, he won't turn around until 8/0.4706 = 17 years have passed in this frame; when he does turn around, he'll be at rest in this frame, and at this moment the distance between him and the Earth is (17 years)*(0.88235c - 0.6c) = 4.8 light years. The Earth will continue to approach him at 0.6c after this point, reaching him after an additional 4.8/0.6 = 8 years in this frame. And when A turns around after 8 years, he is now moving in the direction of the Earth at 0.88235c, with the Earth having moved a distance of (8 years)*(0.6c) = 4.8 light years in those 8 years. The time for A to catch up to the Earth is given by 4.8 + 0.6t = 0.88235t, or 17 years. So in this frame A starts out at rest, accelerates after 8 years, then takes another 17 years to catch up to earth, while C starts out at high speed, accelerates to rest after 17 years, and then the Earth takes an another 8 years to catch up to him, meaning all three twins reunite after 25 years have passed in this frame.
So now let's figure out how much time has passed on each twin's clock after 8 years, after 17 years, and after 25 years in this frame, using this frame's values of the speeds and time dilation factors.
Between departure and 8 years:
-twin A has been at rest, so 8 years have passed on his clock
-twin B has been moving at 0.6c, giving a time dilation factor of 0.8, so (8 years)*(0.8) = 6.4 years have passed on his clock.
-twin C has been moving at 0.88235c, giving a time dilation factor of 0.4706, so (8 years)*(0.4706) = 3.765 years have passed on his clock.
Between 8 years and 17 years:
-twin A has been moving at 0.88235c, so in the 17-8=9 years of this section, (9 years)*(0.4706) = 4.235 additional years have passed on his clock.
-twin B has been moving at 0.6c, so (9 years)*(0.8) = 7.2 additional years have passed on his clock.
-twin C has been moving at 0.88235c, so 4.235 additional years have passed on his clock.
Between 17 years and 25 years:
-twin A has been moving at 0.88235c, so in the 25-17=8 years of this section, (8 years)*(0.4706) = 3.765 additional years have passed on his clock.
-twin B has been moving at 0.6c, so (8 years)*(0.8) = 6.4 additional years have passed on his clock.
-twin C has been at rest, so 8 additional years have passed on his clock.
If you add all these up, you again find that 20 years passed on twin B's clock while 16 years passed on both A and C's clocks between the beginning and end of the journey; also, twin A and C's clocks each registered 8 years before they turned around and 8 years after. This got a bit complicated, so let me know if there's any steps you don't follow.