The costs and expenses necessarily incurred in the removal of any such cause under the foregoing provisions shall be adjusted and allowed by the court wherein the cause is tried, and shall be taxed as other costs in such cause.