No, they do not work through the same pathways.
Nicotine affects "nicotinic" receptors. These are the same receptors affected by acetylcholine, although acetylcholine also affects muscarinic receptors. (Basically, there are two cholinergic receptors and nicotine only agonizes one of them.)
Caffeine antagonizes adenosine receptors. Adenosine is an inhibitory neurotransmitter. Caffeine binds to these receptors and blocks them.
Ephedrine stimulates dopamine and norepinephrine receptors.
Obviously, there is interaction between all these chemical pathways, and it's impossible to affect one without affecting the other. But the pathways directly affected are different for all three compounds.
Generally, use of one will not produce a cross-tolerance for the others.