(a) Wherever any of the special districts or special taxing funds lie and exist wholly in one (1) county, then the county court shall have jurisdiction of the excess or surplus funds and may order them transferred to the general revenue fund of the county.
(b) Wherever the special taxing districts or special taxing funds lie in two (2) or more counties, then any chancellor in whose district any one (1) or more of the counties lie shall have jurisdiction of the excess or surplus so remaining and may, upon petition of any county judge or any taxpayer of any of the counties, order the excess and surplus so remaining to be paid and transferred to the treasurer of the respective counties in the proportion that the whole fund was contributed by the respective counties. The treasurers shall credit the funds so received to the general revenue funds of their respective counties.