By using index-1 property, we can easily duplicate the layer and reference “one above it” in the Layer Stack. This makes the whole rig much more flexible. You can add, swap or subtract layers, without breaking the expressions.
d = delay*thisComp.frameDuration;
By converting the delay value to Composition Time, we convert values form SECONDS to FRAMES. This is especially useful for precision of the delay, as you can go into incremental offsets e.g. 2.5 frames etc.
sourceLayer.position.valueAtTime(time – d);
Final piece of code is the one that does the magic. ValueAtTime() can be added to any property, not only Transform properties. It simply “takes the value” and delay it by X amount of time.