Which government? The city government is broke. If they merge, the larger city could pay for transitioning costs, but that would be a massive cost (worth it, possibly!) and politically difficult.
In that situation, the problem has to be solved on the level above. The State as a whole should pay the cost, since it is the State as a whole that would benefit.