This is a nice form of the twin paradox, (except for the initial and final accelerations: they only confuse things, so I'll ignore them). The paradox is that each twin sees the other aging slower than himself, yet they come back the same age.
For concreteness, we need to put some numbers to it, and fly with one twin, twin A.
Lets say they leave Earth with $\gamma=10$ ($v=0.995c$), and coast for $T'=10$ years (ship time) meaning they travel $10y\times v \times \gamma \approx 99.5 ly$ according to Earth, on each leg of the trip.
First Leg:
In this time, twin A ages $T'=10$ years, but his lattice of co-moving observers with clocks and rulers see twin B flying by at $\gamma = 199$ ($u=0.999987c$), having aged a mere 18 days.
Begin Deceleration:
When twin A begins his deceleration day, he sees Earth is $vT'=0.95\,$ly away, and twin B is only $uT'=9.99987\,$ly away.
As he decelerates, he finds that his co-moving observers are no good: they are in the past. He picks up new co-moving observers who keep moving forward in time as he slows, and thus the one at the same position and time as twin B becomes further away, and moves into what was Twin A's future.
$V_{Earth} = 0$: Twin A has stopped. He finds the twin B is his same age, not moving, and they are both $vT'\gamma=99.5\,$ly from Earth. This is but a moment. They all agree with Earth: while they have aged 10 years, the date is 100 years after they left.
Accelerate Towards Home: As Twin A accelerates home, he discovers that his lattice of co-moving observers over at Twin B is jumping into the Earth's future, fast, and as he reaches full coasting speed, twin B is 9 years and 347 days older than he is, not because he as aged fast, but because twin A's lattice of co-moving observers has moved forward in time. At this place and time, he is only 1/2 a light year from home in Earth's frame.
Coast Home Twin B ages 18 days, while Twin A ages 10 years, winding up at the same age. Earth ages another 100 years.
The point is that although Twin B's clock is always moving slower, when they are far apart there is no sure universal definition of simultaneity, and in the Earth's frame, A's definition of now at B is in the past on the way out, and in the future on the way home (and vice, versa of course).
It is the change in a distant "now" as velocity changes that accounts for the missing time. This is not time dilation, it is reversible (if one turns around again...time dilation doesn't go backwards, but changing your distant definition of "now" does).