If nobody minds I'll do the calculation for a twin that stays on Earth and one that goes to the moon and back. All calculations are done in the twin who remains on Earth's frame.
I'm also going to use ds^2 = dt^2 - dx^2 - dy^2 - dz^2, which is equivalent to ds^2 = -dt^2 + dx^2 + dy^2 + dz^2, but easier to use in this case.
Basic set up:First of all I have to get the problem of units out of the way.
Since I'm computing a spacetime distance I'm going to have to use the same units for all quantities. Distances in space are measured using meters. So let's take a meter as our measurement. However humans use seconds for measuring distances in time, in order to compute the spacetime distance I'll have to convert a second into meters.
Well basically a second is (roughly) 300,000,000 meters in the temporal direction.
Now I'll ignore y and z. So I'll be using ds^2 = dt^2 - dx^2.
First of all the starting location of both twins will be labelled as:
(0 ; 0). That is t=0, x=0.
Stationary twin:If one twin sits where they are for four seconds they end up with coordinates:
(1,200,000,000 ; 0) or t=1,200,000,000 and x=0.
Now I'll compute the spacetime distance. Since dx=0 (no difference or change in spatial coordinate) we just have ds^2 = dt^2.
dt = 1,200,000,000 - 0 = 1,200,000,000
dt^2 = 1,440,000,000,000,000,000
Hence ds^2 = 1,440,000,000,000,000,000 and taking the square root:
ds = 1,200,000,000 meters.
Moving twin:The moon is roughly 384,000,000 meters from Earth. The second twin starts at Earth and travels to the moon in two seconds.
So they start at (0 ; 0) and end up at (600,000,000 ; 384,000,000).
The spatial difference is dx = 384,000,000 - 0 = 384,000,000
Similarly, dt = 600,000,000.
dx^2 = 147,456,000,000,000,000
dt^2 = 360,000,000,000,000,000
ds^2 = 360,000,000,000,000,000 - 147,456,000,000,000,000 = 212,544,000,000,000,000.
Taking the square root, ds = 461,024,945 meters.
Assuming the twin takes an exactly similar journey back to Earth, that is they return in two seconds, then the distance for the return journey is again ds = 461,024,945 meters.
Hence the total spacetime distance of the moving twin is
ds = 2 x 461,024,945 meters = 922,049,890 meters.
Which is significantly less than the 1,200,000,000 meters of the stationary twin. Hence spacetime distance is reduced by moving through space.