Whenever, under the provisions of this chapter, a new highway is constructed across a railroad, or an existing grade crossing is eliminated or changed (or the style or nature of construction of an existing crossing is changed), the entire expense of constructing a new grade crossing, an overcrossing, under-crossing, or safer grade crossing, or changing the nature and style of construction of an existing crossing, including the expense of constructing approaches to such crossing and the expense of securing rights-of-way for such approaches, as the case may be, shall be apportioned by the commission between the railroad, municipality or county affected, or if the highway is a state road or parkway, between the railroad and the state, in such manner as justice may require, regard being had for all facts relating to the establishment, reason for, and construction of said improvement. If the highway involved is a state road or parkway, the amount not apportioned to the railroad company shall be paid as provided by law for constructing such state road or parkway.