Measure the distance between the galaxies by using mathematical models.
You don't have to measure the waves coming from galaxies, but you can assume the location of the galaxies and use mathematical models to measure various properties of the galaxies.