There's one really important thing that the opening poster seems to have forgotten. A lot of the costs of a car are sunk costs (or as close as).
My insurance doesn't vary if I take an extra leisure trip. My MOT cost doesn't. The depreciation rate for a few extra miles is basically zero. The cost of servicing, tires, cam belts are pretty marginal in the grand scheme of things mile for mile.
I am not saying these are insignificant costs. The capital costs of a car can be huge and servicing and repair is hardly cheap. But once you have the car, you don't take these costs into your assumptions for every individual trip.
So then you just have the core costs. Fuel, parking and any tolls/ congestion charges.
In Britain, the train can very rarely, if ever, compete with these even when someone is traveling alone. If there's a group of you, the car will win by a country mile.
Then you have the huge factor of convenience. With the car, I can leave when I want. I can go on a detour. I can visit a pub on the way home etc. With a train, I have little convenience. If I have bought an advance, I am trapped on the trains I specifically booked. Oh, and I lose the money if I book a day at Brighton and there's torrential rain and a storm force gale. A more flexible ticket means more cost. What if I am taking luggage with me? On the train I have to carry heavy bags around hoping there's space on the train to store them and hoping that place is in my constant sight for safety. Yes, a train might be more 'relaxing', but it might not be.
This isn't true for all countries. I was in Poland recently. A train ticket from Krakow in Poland to Warsaw can be had for 60 zloty which is about £12 and it does the route in just over three hours. The fancier Pendolino trains have tickets from 49 zloty (under £10) if you book a specific train in advance and takes 2.5 hours. The car takes 3.5 hours and it is about 300km/190 miles. Let's say the car does 6 litres per 100km (which is 47mpg) and fuel costs 6 zloty (£1.20) per litre, that makes 6*3 = 18 litres * 6zl = 108 Zloty per trip. That means on fuel alone, the train is half the price for a solo traveler and almost the same as two travelers.
You still have the same factor of timings and convenience, but it is at least very competitive.