At least for passenger lines the single track of heavy rail has a >30x higher route capacity than a single freeway lane (https://en.m.wikipedia.org/wiki/Route_capacity). So a fair comparison would be a single line of heavy rail to a 30+ lane freeway (one direction), making the rail about 1/10th the cost.