Upon the determination of any appeal under this chapter before the Tax Court, or of any review hereunder by the Supreme Court, the costs and disbursements shall be taxed and allowed in favor of the prevailing party and against the losing party as in civil actions or, if there has been an offer of judgment or settlement by a party prior to ten days before the court hears the appeal, pursuant to Minnesota Rules of Civil Procedure, rule 68. In any case where a person liable for a tax or other obligation has lost an appeal or review instituted by the person, and the Tax Court or court shall determine that the person instituted the same merely for the purposes of delay, or that the taxpayer's position in the proceedings is frivolous, additional costs, commensurate with the expense incurred and services performed by the agencies of the state in connection with the appeal, but not exceeding $5,000 in any case, may be allowed against the taxpayer, in the discretion of the Tax Court or court. Costs and disbursements allowed against any such person shall be added to the tax or other obligation determined to be due, and shall be payable therewith. To the extent described in section 15.471, where an award of costs and attorney fees is authorized under section 15.472, the costs and fees shall be allowed against the state, including expenses incurred by the taxpayer to administratively protest or appeal to the department of revenue the order, decision, or report of the commissioner that is the subject of the Tax Court proceedings. Costs and disbursements allowed against the state or other public agencies shall be paid out of funds received from taxes or other obligations of the kind involved in the proceeding, or other funds of the agency concerned appropriated and available therefor. Witnesses in proceedings under this chapter shall receive like fees as in the district court, to be paid in the first instance by the parties by whom the witnesses were called, and to be taxed and allowed as herein provided.