The department shall, after hearing, determine the amount which shall be assessed upon each city or town which is included in a district established under the provisions of section twenty-one to meet the costs, including capital costs, of operating such district.