So if a Farmers Quarter adds 10 food and costs 200 production, that's 200/10 = 20.
I’d say this is accurate for production, which you often want to increase first, since it will reduce the turns to complete future districts to the point that you can carpet other districts for money or science as you specialize cities. When you can get as much return an infrastructure than a district the infrastructure is better because it won’t increase district cost.
But for food. Growth has diminishing returns, so 50 food might give you 50% of a pop each turn, but 200 food only gives you 70% of a pop each then. So keep food just high enough to have a good growth rate, building more as your pop/consumption increases. The 5 food per horse is a good first choice since it’s not a district and with 2+ horses it’s more than a farmers quarters. I usually build other districts in the direction of a high food area and then plop down a 12+ food FQ when I get there rather than build mediocre FQ along the way. Most of my early planning is how to avoid putting districts on rivers, which are good for food and industry to avoid then losing the other yield.
I get most early science from specialists, and build market and research quarters when I find myself lacking in either, more money when my army grows and more science as needed to ensure that I can begin researching the first unit technology as soon as I advance eras. Rome is the only time I’ve felt the need for early focus on science, since their EU is so deep into the classical tech tree. Works for them though since you can skip their EQ until you get your RQ down and build them during your war to capitalize on the victorious status afterward.
But I play all these games by feel, generally checking where are the most yields right now, but never calculating turns to break even. I think that assumes a linearity that I don’t believe applies, since it would be complicated to compare lost production potential when investing in non production yields. Something like (skipped over production per turn) x (turns skipped over) every time you build something other than production, but you certainly often do need to. But then at some point, spending more turns on more production has its own diminishing returns since district cost increases and there are only so many infrastructure and units to build.