The California High Speed Rail project failed miserably, and cost the taxpayers $12.4 billion[1] to go from Bakersfield to Merced or about 160 miles (two cities nobody commutes from...but I digress).
At it's cancellation point, it was estimated to cost over $98.1 billion for a Los Angeles to San Francisco route - but we should note the cost estimates were going up $10+ billion every year they were re-estimated. The entire thing was supposed to "only" cost around $30 billion when introduced.
To make a High Speed Rail line that covers the entire United States... you're looking at hundreds of billions, up into the trillions of dollars... if not more.
At these cost rates, it's well over $200 billion for a straight line between San Francisco and New York City... but of course it won't be a straight line and it'll need to go to more places than those two cities in order to attract any sort of reasonable ridershare.
[1] https://en.wikipedia.org/wiki/California_High-Speed_Rail