Trade port income is based on your longest line of connected planets with tradeports. The longer you chain of tradeports is, the greater your income will be from each individual tradeport.
x - planet with a trade port
o - planet with nothing
o-x-x-x-

This means your longest chain is 4, so each tradeport will generate that much cashflow according to that multiplyer. If you place 2 on one planet, it give the same amount of cash flow that your other tradeport on that planet is generating, but it will not increase your chain length.
Refineries on the other hand effect the planet they are on and all the planets adjacent to them. Each planet can only be affected by 3 refineries at a time. This means if you build 2 refineries on one planet, and 2 refineries on a planet directly adjacent to it, even though you have 4 refineries, you will only be getting the benefit of 3 on those planets. Best to place a refinery or 2 at a planet with the largest amount of crossroads
2 - planet with 2 refineries
1 - planet with 1 refineries
0 - planet with nothing
0-1-2-0
here, your 2 center planets will be receiving the benefit of full 3.
You get the the idea anyway.