In California, Chinese immigrants were plentiful, so railroad tycoons capitalized on these people because they were a cheap labor force and used them to build the Transcontinental Railroad from California to Utah where it met up with the railline that was being built westward.
They could trade the excess crops and animals with others. Trade increased, so population grew, so people found new ways to improve their lifestyles. They developed laws, kept records, and invented ways to deal with their new way of life.