Section 62. Two railroad corporations, incorporated under the laws of the commonwealth, and whose railroads enter upon or connect with each other, may contract that either corporation shall perform all the transportation upon and over the railroad of the other; and any such corporation may lease its railroad to any other such corporation; but the facilities for travel and business on either of the railroads of said corporations shall not thereby be diminished. Such leases shall be upon such terms as the directors agree, and as a majority in interest of the stockholders of both corporations at meetings called therefor approve, subject to section fifty-four of chapter one hundred and fifty-nine. The income arising from such contracts or leases shall be subject to the provisions of law relative to the right of the commonwealth to purchase the railroads of the railroad corporations or to reduce their tolls, in the same manner as that arising from the use of the railroads. Copies of such contracts or leases shall be deposited with the department, and full statements of the facts shall be set forth in the next annual return of such corporations. This section shall not authorize a lease or contract between two railroad corporations, each of which has a terminus in Boston. The railroads of two railroad corporations shall be considered to enter upon or connect with each other, within the meaning of this section, if one of such railroads enters upon, connects with, or intersects a railroad leased to the other or operated by it under a contract as herein authorized.