In Missouri, most prosecutions are handled by a county's Prosecuting Attorney's office, which are funded by each county's budget (largely property taxes).
There are 115 counties, including St. Louis. In larger counties, those offices will have 150 employees and $10 million budgets. The counties sometimes pay for office space for the Public Defender, but they're not paying salaries. The $35 million for Prosecution Services in the state budget is to fund a small office that helps coordinate the county efforts statewide, and helps prosecutors in small counties who are overwhelmed by unexpectedly complex cases.
So the $40 million for defense state wide, which will be dwarfed by the combined budgets of the Attorney General and county prosecutors.