The rules outline what happens when you extend a rail line to a city-site, but it is not clear (to us) of how much gold you are awarded for building & connecting two previously unconnected city-sites. In this case, one of the sites is has to be occupied by one of your cities.
The actual rule is:
If you build a rail and, as a result, an "isolated" city-site is connected to another city-site for the first time, you and perhaps other players receive gold. An isolated city-site is a city-site (empty or occupied by a city) that is not connected to any other city-site by rails. To pay out the gold, first determine the shortest route (series of rails) that connects the previously isolated city-site to another city-site.
Both cites were 'isolated' so do you get x or x*2?