Section 82. If a public way in which a street railway location has been granted shall be thereafter laid out, taken charge of or constructed by or under the authority of said department of highways, it shall thereafter, relative to the location and maintenance of a street railway upon such state highway, have the authority conferred by sections seven, seventy, seventy-one, seventy-seven and eighty-nine upon boards of aldermen and selectmen, and shall exercise such authority in the same manner, and subject to the same rights and limitations, except that subject to the approval of the department of telecommunications and energy an order of said department of highways for the alteration of a location may be made without the written acceptance of alterations required by said section seventy-one. If the company fails to comply with such order so approved within the time specified therein, said department of highways may carry out the work at the expense of the company, and such expense shall be recovered in contract.