
As I understand it, he worked with the State to receive add'l funding (4 billion a year for 2 years), restructured the city's pension plans, delayed a class size mandate, and added in new taxes to luxury properties that are left empty most of the year (netting half a billion a year in revenue). The State funding stopped the bleeding and the new tax policies will allow them to remain in the black once that State funding stops.
as for why the state was willing to do that, my guess is Mamdani is good PR for the state of NY and works well with Hochul, something the previous mayor of NY did not. i think the Hochul admin doesn't want Adams mismanagement to become a genuine debt crisis, as those can and have damaged the city of NY greatly when they've been allowed to bleed.