Name the two railroad companies that were given charters to build the first transcontinental railroad and the city from which each started.