Section 5. When a highway runs through two or more towns, they may appropriate money for the construction, repair, maintenance or improvement thereof in common, and may purchase road machinery therefor in common. Money so appropriated shall be expended by such persons and in such manner as the towns concerned shall agree upon.