If any funds become available from the federal government or otherwise for expenditure in conjunction with funds accruing to any incorporated city or town for the construction, alteration, repair, or improvement of its city streets designated as forming a part of the route of any state highway through the incorporated city or town and the work is to be performed by the department, the state treasurer shall, upon notice from the department, set aside from any moneys in the motor vehicle fund credited to the incorporated city or town, the cost thereof or so much money in the state treasury to the credit of the incorporated city or town as may be necessary in conjunction with the funds from the federal government or otherwise to accomplish the work, the cost to be paid by the state treasurer from the money so set aside upon vouchers approved and submitted by the department in the same manner as payment is made for work on state highways. If any such incorporated city or town has agreed with the state of Washington or the federal government as a condition precedent to the acquiring of federal funds for construction on any city street of the incorporated city or town designated as forming a part of the route of any state highways, that the street will be maintained to a standard and the incorporated city or town fails to so maintain the city street, then the department may perform the maintenance, and the state treasurer is authorized to deduct the cost thereof from any funds credited or to be credited to the incorporated city or town and pay the same on vouchers approved and submitted by the department in the same manner as payment is made for work performed on state highways.