I don't think XBee radios, even the higher power XBee-Pro which has a maximum power output of +18 dBm (North America only), will be able to reliably communicate over a 2 mile link in all conditions.
One of the XBee modules with "long range" capability is the XStream which claims:
Indoor/Urban range up to 1500 feet (900 MHz model) Outdoor
line-of-site range up to 20 miles (with high gain antenna)
Now it is probably safe to assume that actual results in the field will not be substantially better than the claims being made by the manufacturer, and the above ranges are under ideal conditions. Assuming there will be times when your car will be driving in less than ideal conditions, such as an urban area, there will be times when their urban range of 1500 feet may be much closer to what you observe than 2 miles.
When designing a data link between your cars the best way to start is not with the radios themselves but rather with a link budget analysis.
A link budget is the accounting of all of the gains and losses from
the transmitter, through the medium (free space, cable, waveguide,
fiber, etc.) to the receiver in a telecommunication system. It
accounts for the attenuation of the transmitted signal due to
propagation, as well as the antenna gains, feedline and miscellaneous
losses. Randomly varying channel gains such as fading are taken into
account by adding some margin depending on the anticipated severity of
its effects. The amount of margin required can be reduced by the use
of mitigating techniques such as antenna diversity or frequency
hopping.
A simple link budget equation looks like this:
Received Power (dBm) = Transmitted Power (dBm) + Gains (dB) − Losses (dB)
For a data channel you will also need to determine what is the required capacity ( do you need 10 MBits per second or is 300 BAUD OK?) and an acceptable bit error rate. In other words there will be times when data gets garbled in transmission and you need to deal with this either by re-transmission, redundant transmissions, check digits or some such means.
Here is an Intersil Tutorial on Basic Link Budget Analysis.
Bringing this back to what is expedient, the easiest solution would be to simply use higher power radios, if possible. You do not say if this is a school, for profit company or what. Educational projects often use ham radios, specifically APRS for projects like this.
ADDENDUM: One alternative you might like to investigate is TI's CC1120 development kit;
TI claims "More than 10 km out-of-the-box with development kit (139-dB link budget) and 65-dB adjacent channel rejection"
Any length antenna can radiate any amount of power at any frequency, within the limitation of the current being so large as to melt the wire. I think this is a theoretical argument, so let's assume perfect wire, which has no resistance, which can therefore handle infinite current.
Every length of antenna has some knowable impedance at every frequency. The imaginary parts of this impedance make the antenna look inductive or capacitive to the transmitter. These can't dissipate power. From a purely conservation of energy point of view it should be obvious that the imaginary parts of the impedance represent only energy temporarily stored in one part of the cycle and released in another. Only the resistive part (the real part) of the impedance looks like a power loss to the transmitter. This power lost to the transmitter is the power that is radiated by the antenna.
To radiate a particular power, you have to drive the antenna with a large enough signal so that the power into the resistive part of the antenna's impedance is the power you want to radiate.
That was the theoretical argument. However in practise the real part of the impedance is very small and is swamped by the imaginary part unless the antenna length is either "long" (relative to the wavelength) or a odd multiple of 1/2 the wavelength. At odd multiples of 1/2 wavelength for a dipole (a center-fed length of wire with a cut between the two feed points), the reactance (the complex part of the impedance) crosses over between capacitive and inductive and happens to be zero. This means the antenna looks like a pure resistor at that frequency. This makes it much easier to use the antenna to radiate significant power. When the antenna impedance is largely reactive with small resistive component, the voltage required to achive the power you want can be very large. Any transmitter trying to produce that voltage must also deal with most of the power it is putting out coming back (must be able to drive a highly inductive or capacitive load). This means the currents are high, which causes loss in the transmission line between the transmitter and the antenna. It is for these reasons that one choses antennas of specific size for specific frequencies, not because radiating otherwise is impossible. It's perfectly possible, just not practical.
There is a trick that can be used to make antennas with large reactive components appear resistive to a transmitter. This is by placing inductors and/or capacitors in series and in parallel with the antenna. If done just right, these reactive impedances add to the antenna's impedance to cancel out the reactive components, leaving only the resistive. Another way of looking at the same thing is that the extra reactance together with the antennas existing reactance form a resonant tank circuit at the frequency of interest. This tank circuit produces the large voltages and currents needed to drive the antenna so that the transmitter only needs to produce the minimum to drive the resistive portion. For more information on this, look up something called a Smith chart. That is a graphical means to determine the additional reactive components to add to make the whole network look resistive at a particular resistance.
In practise, even this strategy is limited. That is because the antenna itself still requires the high voltages and currents to radiate power at a inconvenient frequency. Real capacitors, inductors, and even wires have limits and real losses, so this strategy can only be take so far in practise.
Best Answer
Neat problem.
I think you'll need the GSM repeater. Considering they are not that expensive compared to the cost of other equipment you'll need, it's probably your best bet.
The geology is going to have some impact. If you happen to be surrounded by a lot of metal, you're in a big Faraday cage. If you happen to be surrounded by radioactive material, that will interfere. (Many stone buildings give off significant amounts of radiation.) It's quite possible that you will run into some strange problems. If getting it right quickly was a concern, I'd hire a professional to bring in test equipment and determine what's feasible.