Whenever it is considered in the securing of any lands for state highway purpose, whether by condemnation or otherwise, that it is for the best interest of the state, for specific constructural items of damage claimed, the court or judge may order or the person whose lands are sought may agree that a portion or all work or labor necessary to the land or remaining land by reason of the taking by way of damage, be performed by the state through the department as all or a part of the consideration or satisfaction of the judgment therefor, in which event the department may perform the work as a portion of the right-of-way cost of the state highway.