First, I would say that you would need a 3rd Table that would hold the connected records between Table 1 and Table 2. The 3rd Table will allow you to have connections to records in Table 1 from Table 2.
Second, Quick Base doesn't have anything built in that will determine the distance between 2 points. To do this, you will need some type of script that would do a comparison of all records in Table 1 to those in Table 2, determine the distance between them, and then create a record in Table 3 if the distance meets your specified criteria. You may be able to build something like this using Zapier or Workato, but I've never attempted distance calculations in either of them.