Where two or more chartered railroad companies whose lines terminate in the same city contract to use the same track within the corporate limits, the company owning the track shall not be responsible to its employees for injuries sustained solely by reason of the negligent use of the track by the employees of the other company.