I got a few XL power functions motors, and want to combine them to make a racing car. Let's get to right to the question:
...or this one?
PS: It is okay if you warn me that even with three XL motors, the car won't work.
The torque in both versions would be the same.
Your first version just adds 3 of these gears:
The ratio between them is 1:1 so it will be the same as if you connect the axle straight into those small gears, as you do in the second image.
(Well, technically speaking, having 3 more gears in the mix will sacrifice some power to friction, but the theory is the same.)
Note, this answer assumes you aren't also running an axle through both these gears in your first image.
If you are, then it simply will not work.