The correct answer is true.
It is true that most railroads made money to build new track selling land that had been given to them by the government.
We are talking about the times when the Transcontinental Railroad was built. Some railroad companies profited from their participation in the construction of this railroad because they sold their own government-granted land to farmers.
With the Pacific Railroad Act of 1862, the federal government authorized the construction of the Transcontinental Railroad that would connect the East with the West. The two companies that participated in the construction were the Union Pacific and the Central Pacific. The connected Sacramento, California with Omaha Nebraska. The joint point was Promontory, Utah, on May 10, 1869.