Your project is similar to a homebrew radar, except that you're adding extra time to the journey, as a unit receives and returns the signal.
To make your project successful, you need to measure this extra time, and make it reliable and unchanging. Then you can calculate the true transit time.
Or your project may be similar to an airplane transponder, which transmits data in answer to a call signal on its frequency. The airport may (I don't know for sure) calculate the plane's distance by the same method you wish to use. Since the distance can be tens or hundreds of miles, the time added by the plane's internal electronics may be a less serious error.