Section 24. Upon written complaint, relative to the service or charges for service in, to or from any city or town as rendered or made by any company engaged therein in the transmission of intelligence by electricity, by the mayor or selectmen, or by twenty customers of the company, the department shall grant a public hearing, first giving to the complainants and the company reasonable written notice of the time and place thereof. Upon written complaint of the mayor, selectmen or twenty legal voters of a city or town within which any railroad, railway or other carrier of passengers under the jurisdiction of the department is located or renders service, alleging grounds of complaint, the department shall examine the condition and operation of such carrier, first giving to the complainants and such carrier reasonable written notice of the time and place thereof.