Buying and selling goods is actually pretty straightforward once you know how the formulas work!
To calculate the cost per unit when buying goods the following formula is used (see 6.6.1):
So the cost to buy one unit of Gold (Goods Factor 29 - see 6.6.3) from a trade city with a rate of 6, and with 100 units currently in the city would be:
or 26,540 Louisdore per unit. So to buy 50 units would cost 50 x 26,540 = 1,327,000 Louisdore!
Selling goods is much the same, with just one added complication. The formula is (see 6.6.2):
So the price for selling one unit of food (Goods Factor of 4) at a trade city with a rate of 5, with 1000 units currently in the city and selling a total of 500 units would be:
or 554 Louisdore per unit. The grand total when selling 500 units of food would be 554x500 = 277,000 Louisdore.
I hope this clears this up for you!