Section 75. All damages sustained by any person in his property by the taking of land for or by the alterations of the grade of a public way, or by an abutter thereon by the discontinuance of such public way, to the same extent as damages are recoverable by abutters on ways discontinued by towns, or by the taking of an easement in land adjoining a public way, shall primarily be paid by the city or town, or, in case such public way is a state highway, by the commonwealth; and all damages caused by the taking of land for the railroad or by the change or discontinuance of a private way, or by the taking of an easement in land adjoining a private way or a railroad location shall primarily be paid by the railroad corporation. Any amount paid by way of damages by the commonwealth or the city or town or the railroad corporation primarily liable therefor shall be subject to investigation by the department of highways, unless such settlements are assented to in writing by all parties in the proceeding. If the parties interested cannot agree upon said damages, any party may have the damages determined under chapter seventy-nine. All expense resulting from the necessary relocating or changing of streams and watercourses forming the natural drainage channels of the territory where alterations of grades are authorized, and of sewers, drains and pipes therein owned and operated by a city or town, shall be primarily paid by said city or town, and shall be a part of the actual cost of the alterations specified in section seventy.