Exercise:
In the definition of continuity show that the centered intervals $$|f(x) - f(x_0)| < \epsilon \text{ and } |x-x_0| < \delta$$ may be replaced by an arbitrary open interval containing $f(x_0)$ and a sufficiently small open interval containing $x_0$.
Attempt:
$|f(x)-f(x_0)| < \epsilon$
$f(x) - \epsilon < f(x_0) < f(x) + \epsilon$
Let $f(x_0) > \epsilon_{\text{lo}} > f(x) - \epsilon$ and $f(x) + \epsilon > \epsilon_{\text{hi}} > f(x_0)$
$\epsilon_{\text{lo}} < f(x_0) < \epsilon_{\text{hi}}$
Take similar steps with $|x-x_0| < \delta$
$\square$
Is my attempt correct? If not, where and why'd I go wrong?