The Western Pacific and Southern Pacific Railroads, longtime rivals who each built and operated tracks between northern California and Utah, agreed to share their lines between meeting points near Winnemucca and Wells, a distance of approximately 180 miles .