Wireless communications for distance estimation (RFID perhaps?)
Using RF signal strength to estimate a distance such as "about 25cm apart" will not work for a few reasons:


Signal strength will vary between the two devices even when there is apparently unobstructed line of sight between them, due to changes in dielectric constant of the air due to barometric pressure, humidity, suspended particulate matter, and perhaps other factors too. This means there will be variation even across the diurnal cycle. At the small distances in question, this variation will be significant.
Presence of conductive materials (and RF reflecting surfaces) within the vicinity will also cause signal strength variation, just like light intensity of an LED measured by a sensor would vary due to reflected light from surroundings. 
The emission signal strength itself is not guaranteed to be constant, nor precisely equal between any two RFID devices. Also, some devices boost signal periodically to improve reading from passive RFID tokens, or to scan for low-signal devices.
When the distances involved are comparable to the wavelength used, other effects such as signal polarization and diffraction also add wildcards to the distance estimation effort. This is especially true of the common 900 MHz RFID band, with wavelengths in the vicinity of 30 centimeters. 




Now for some solutions...

For the distances mentioned, ultrasonic distance sensing is commonly used. 

If the two objects are at a known orientation to each other, or at least one of them can be oriented towards the other, many of the popular hobbyist ultrasonic TX-RX pairs or sensor modules (such as Parallax Ping)))) can be used. 

If orientation is not fixed, then an omnidirectional ultrasonic emission is used rather than the common directional TX units, and multiple RX units arranged to cover a circle, provide return pulse sensing for distance computation. 

Alternatively, if precision of distance is not so crucial, and if the albedo (reflection coefficient) of the sensed object is essentially fixed, then an alternative is to use an infrared proximity sensing module, such as the Vishay TSSP4Pxx series. This answer has further insight into this approach.