Step-by-step explanation:
Recession velocity of a galaxy is related to the distance at which the galaxy is located. This relationship is given by the hubble constant, as follows:
![v_r=HD](https://img.qammunity.org/2020/formulas/physics/high-school/nbtanqrtq1pwafa6mu4ishce9irge5wdj8.png)
Hubble constant is aproximate
and 1 megaparsec (Mpc) is 3.26*10^6 light years. Rewriting for D:
![D=(v_r)/(H)](https://img.qammunity.org/2020/formulas/physics/high-school/cxn3lahbzn1ndj903z0g7q3ca2cnce3ly4.png)
For galaxy A:
![D=(2000(km)/(s))/(70(km/s)/(Mpc))\\\\D=28.57Mpc\\\\D=28.57Mpc*(3.26*10^6ly)/(1Mpc)=9.31*10^7ly](https://img.qammunity.org/2020/formulas/physics/high-school/d08gixm3fm8nse8o10es3w63fi1iqg831c.png)
For galaxy B:
![D=(6000(km)/(s))/(70(km/s)/(Mpc))\\\\D=85.71Mpc\\\\D=85.71Mpc*(3.26*10^6ly)/(1Mpc)=2.79*10^8ly](https://img.qammunity.org/2020/formulas/physics/high-school/qbuzezzavp9w9zac60asaz9wntx853uz6u.png)