Assuming the transit is fully utilized and the car is mostly not. And maybe that's a good way to look at it. But in Portland the light rail is often well under capacity, and in that case a carpool likely wins on efficiency.
> the cost of cars also includes the cost of roads, the cost of land under those roads, the cost of parking
Partially. Those roads will have to exist even if we did not have personal cars.