I have a mainly commercial city which currently supplies its own water and power. I would like to outsource it to a neighbouring city. However, this would cost $2k/mo more than generating it in the city, which is significantly larger than my current budget surplus, and even more expensive than wind power. What affects the price charged in neighbour deals?
The neighbor current needs - If they badly need power, they will sell it very expensive or not sell it all. If they produce more than they can use, they'll sell it cheaply. Same goes for water, trash and others.
Your city needs - If you need a lot of power, they'll sell for more, since you'll probably pay more. Surplus and demand, simply put.
Other deals you have with that city - if you have another deal that is favorable to them (that varies a lot) the price will probably lower.
Your city size - If your city is considerably bigger than the neighbor, they'll charge more. If it's considerably smaller, they'll charge less.
That is in order of importance: City size almost doesn't matter, but neighbor's needs matter a lot.