Both are really bad for you, in different ways.
It doesn't matter which is worse, they are both dangerous, avoid them. Both have carbon monoxide. Cigarette smoke has 10 times more particles than car exhaust and over 4000 other toxic chemicals. Car exhaust has both small particles which get trapped in your lungs and free radicals created by the catalytic converter which also damage lungs.