It was across the toughest bit. There were already railoads out Omaha.
What you have to look at is the terrain between there and Sacramento. It's all mountains and desert and at the time almost completely unpopulated.
Apart from the mountains not much different to the one we built across the Nullabor then lol
1700km of sand and dirt, unpopulated apart from a few Aboriginal tribes (a few thousand in total at the time covering an area about the size of Alaska!!!)
At the time of the track being laid, there was literally no way across Australia- everything went by ship from the east coast to the west coast and viceversa... the only actual connection was a single telegraph line, not even any roads....
Although there was a mess for a long time (and still is in parts of the country) with three different gauges in use depending on which state you were in lol. At one time, they had a gauge changing stop in SA which went from narrow gauge (WA trains-3 ft 6 in) to SA broad gauge (5 ft 3 in)- they lifted the carriages with screwjacks (steam driven) and changed bogies- with the passengers still inside!!!
Victoria also had broad gauge, but any passengers/goods traveling from Vic to NSW had to change rains for a long time because NSW used standard gauge (4 ft 8.5 in) while if traveling north to Queensland meant another train change at the border to a narrow gauge Qld train!!!
At the time each state was actually an independent British colony, but each was self governing, hence the mismash of conflicting gauges.... even after Federation in 1901, the tracks were already laid and so many parts of the then new Australian nation still had to contend with the existing infrastructure in place...