The lenght of the railroad at 40C is: ##30014.4m##
The formula that we need is the thermal dilatation formula:
##l_2=l_1(1+lambdaDeltaT)##
where
##l_1## is the initial lenght
##l_2## is the final lenght
##lambda## is the coefficient of
##DeltaT=T_2-T_1## is the amount of incresing (if it is positive) or decresing (if it is negative) of the temperature.
So in this case:
##l_1=30000m##
##l_2=Unknown##
##lambda=12xx10^-5C^-1## (steel)
##DeltaT=T_2-T_1=(40-0)C=40C##.
So:
##l_2=30000m(1+12xx10^-5C^-1xx40C)=30000m(1.00048)=300144m##.