so if we go from A, which is at the origin at (0 , 0), 3 unit east and 5 south we'd end up at G, at (3 , -5) pretty much, Check the picture below.
So since we know the coordinates for E and G, let's find the distance from E to A and then from A to G, add them up and that's how far E is from G.
![~~~~~~~~~~~~\textit{distance between 2 points} \\\\ E(\stackrel{x_1}{-3}~,~\stackrel{y_1}{1})\qquad A(\stackrel{x_2}{0}~,~\stackrel{y_2}{0})\qquad \qquad d = √(( x_2- x_1)^2 + ( y_2- y_1)^2) \\\\\\ EA=√((~~0 - (-3)~~)^2 + (~~0 - 1~~)^2)\implies EA=√((0 +3)^2 + (0 -1)^2) \\\\\\ EA=√( (3)^2 + (-1)^2) \implies EA=√( 9 + 1)\implies EA=√( 10 ) \\\\[-0.35em] ~\dotfill](https://img.qammunity.org/2024/formulas/mathematics/high-school/ojd8o8jupfhnkszi9a2d9dmtftr26uu4n3.png)
![~~~~~~~~~~~~\textit{distance between 2 points} \\\\ A(\stackrel{x_1}{0}~,~\stackrel{y_1}{0})\qquad G(\stackrel{x_2}{3}~,~\stackrel{y_2}{-5})\qquad \qquad d = √(( x_2- x_1)^2 + ( y_2- y_1)^2) \\\\\\ AG=√((~~3 - 0~~)^2 + (~~-5 - 0~~)^2)\implies AG=√( (3)^2 + (-5)^2) \\\\\\ AG=√( 9 + 25)\implies AG=√( 34 ) \\\\[-0.35em] ~\dotfill\\\\ \stackrel{EA}{√(10)}~~ + ~~\stackrel{AG}{√(34)} ~~ \approx ~~ \text{\LARGE 9.0}~miles](https://img.qammunity.org/2024/formulas/mathematics/high-school/ad2aqaph1fah267vkxsdo0ajyqaw8gyjsd.png)