What type of incentives would the city offer a developer in this case to keep a portion of the building as single-room occupancy / affordable housing?
The city has numerous way to incentivize development.
They could offer more density through additional FSR/Height etc, basically allowing the construction of more profitable units to offset the cost of the SRO units. (This is what is often referred to as 'Density Bonusing').
Similarly the city can provide a density "credit" of a certain value, which the developer could potentially apply to a different site they have, IF the density would be more appropriate at that location
They can waive any/all of the plethora of municipal fees that a developer pays during development (I.e. Development Cost Charges)
They can provide partial/total relief of property taxes for a certain amount of time.
Basically development hinges on a financial "Pro-forma"(a total account of Costs, Revenue, Profits, and Land), Assuming the project wasn't already wildly above the necessary profit margins, financial trade-offs need to be given to keep a project feasible.
You will notice that "Land" was one of the key variables, the hard part now is preventing the land owner from "speculating" on the potential value of the land via whatever financial incentives the city provides. The more value the land owner wants...the less effective any financial incentive becomes.
Hope that helps~