For a free rail, its length change ΔL equals its original length L times the temperature change ΔT times the material's linear expansion coefficient α.
We assume every rail is fixed at its centre and can expand equally at both ends, so each neighbouring rail contributes half its length change towards the joint.