Whenever it is necessary to lay out a public highway at or near or along the line between two adjoining counties, and on account of the topography of the land it is not expedient to lay out said road on the line between said adjoining counties, then the boards of supervisors of both counties may lay out the road near the adjoining line between said counties, and both of said counties shall bear the expense of constructing and maintaining such public road in any proportion mutually agreed upon by the boards of supervisors of both of said counties.