Connect RF module to phone to find distance between them
To do this with RSSI is, to put it mildly, very hard. There is so much influence of surroundings, reflections, etc. that makes it virtually impossible to do this in any situation where you are no in an anechoic chamber. Not to mention the impact of antenna directivity, how you are holding the device, etc.

I think it would be easier to use something like GPS to determine position and transmit that, and calculate the distance by just looking at the distance between the two gps locations.