The given path can be illustrated in the following diagram:
She has only 30 miles worth of gas, if she comes back through the same path then the total distance is:
Therefore, she has not enough gas to go back using the same path.
Now, the total distance traveled in a straight path (SP) can be found using the Pythagorean theorem, we get:
Therefore, she needs to take a straight path.