The first is correct. The second is normally "If Tom had had more money, he would have bought a fast car", but your example illustrates a common substitute used in everyday speech. ).
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
2: Tom doesn't have any money now, but if he did [have money now], he would have bought [a] that fast car.