system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do scientists detect the DISTANCE of source of radio waves coming from different regions of universe?
gpt
Simply: Light stretches and the further away something is, the more the light stretches

Less simply:

Waves stretch in accordance to how fast an object is moving towards/away from you, called the doppler effect.

To gauge distance, we must first relate the specific waves (as objects emit more than one, this is very important) to an object. The detected wavelengths are then matched to an existing similar object that is not moving relative to earth.

Using the mathematics of the doppler effect, we can form an estimate of how fast an object is moving away from us. From there, it is possible to estimate the distance from you to the object. This is because there is a natural law in the universe where objects are moving away from you faster the further away you are from it.

Also, different light wavelengths stretch by the same amount for a unit of speed, so the detected spectral lines just need translating to the left or right.