Answer
$8\ miles$
Work Step by Step
Step 1. Assume she lives $x$ miles from the library and the rate (speed) she return home is $y\ mph$, we then know her rate to the library is $y+8\ mph$
Step 2. The time she takes to go to the library is $\frac{x}{y+8}=\frac{20}{60}=\frac{1}{3}\ hr$ which gives $3x=y+8$
Step 3. The time she takes to return home is $\frac{x}{y}=\frac{30}{60}=\frac{1}{2}\ hr$ which gives $y=2x$
Step 4. Use the relation of Step-3 in the equation in Step-2, we have $3x=2x+8$, thus $x=8\ miles$