Not sure if there is a formula, but from experience on standard size, & speed, the following holds true:
- 240 gold per luxury if friendly
- 209 per luxury if showing as friendly but actually not so friendly (this is a good way to know the AI is being deceptive and might be planning to attack you)
- Guarded or Hostile will be much less, maybe 120? I don't recall the exact amount.
- 50 gold for open borders. It will be either 43 or 35 if they are deceptively friendly. If it's 35, a backstab is probably imminent. Hostile/Guarded won't give you anything or maybe 10 gold.
- 45 gold per strategic (225 for 5) if friendly. I don't recall the exact amount for deceptive/guarded/hostile, but I believe it's a similar ratio to luxuries.
- Strategic resource value is dependent on the AI needing that resource. They will give nothing if they don't need it. Otherwise it should be full price depending on your relationship (i.e. there is no sliding scale based on need).
Not sure on your other question.