As a reference point for just how expensive, the Caltrain electrification project in SF is currently estimated at $2.44 billion dollars for 82 km of track, and still climbing. And this is for what's almost a best-case infrastructurally: flat land, few bridges or overpasses, etc. (But, admittedly, what just might the world's worst regulatory environment.)