Update 2/19/2018: It appears that this answer has received a lot of attention, which I'm very glad to know about. When you're reading through this answer and you're trying to learn about $\delta$-$\epsilon$ proofs for the first time, I would recommend skipping the sections labeled Addendum. on your first read. Please let me know of any other clarifications that you would like with this answer.
Whenever I am doing a $\delta$-$\epsilon$ proof, I do some scratch work (note, this is NOT part of the proof) to figure out what to choose for $\delta$. I always tell students to think about the following:
What are you given?
What do you want to show?
In the definition of the limit, you are given an arbitrary $\epsilon > 0$ and you want to find $\delta$ such that $$0 < |x - 1| < \delta$$ implies $$\left|\dfrac{1}{x} - 1 \right| < \epsilon\text{.}$$ You have control over what to choose for your $\delta$ in this case. The idea of this $\delta$-$\epsilon$ proof is to work with the expression $|x - 1| < \delta$ and get $\left|\dfrac{1}{x} - 1 \right| < \epsilon$ at the end.
Let's do some scratch work (again, NOT part of the proof).
Scratch Work
Let's start with what we want to show for our scratch work (starting with what you want to show is bad to do $100\%$ of the time when you're doing proofs - again, this is scratch work and not actually part of the proof).
We want to show that $\left|\dfrac{1}{x} - 1 \right| < \epsilon$. Let's work backwards and try to turn the expression $\left|\dfrac{1}{x} - 1 \right|$ into some form of $|x-1|$.
So, note that $$\left|\dfrac{1}{x} - 1 \right| =\left|\dfrac{1-x}{x} \right| = \left|\dfrac{-(x-1)}{x} \right| = \left|\dfrac{x-1}{x} \right|$$ since $|y|=|-y|$ for all $y$ in $\mathbb{R}$.
The last expression can be rewritten as $\dfrac{\left|x-1 \right|}{\left| x \right|}$. Looking at this expression, we do have $|x-1|$ in the numerator, which is good. But we have that pesky $|x|$ in the denominator.
Since we do have control of what $|x-1|$ is less than (this is our $\delta$), let's choose a really convenient, small number to work with that is greater than $0$. Let's say $\delta = \dfrac{1}{2}$.
Well, if $|x - 1| < \dfrac{1}{2}$, then $$-\dfrac{1}{2} < x-1 < \dfrac{1}{2} \implies \dfrac{1}{2} < x < \dfrac{3}{2} \implies \dfrac{1}{2} < |x| < \dfrac{3}{2}\text{.}$$ So if we choose $\delta = \dfrac{1}{2}$, $\dfrac{1}{2} <|x| < \dfrac{3}{2}$.
Addendum. In many examples, $\delta$ is usually chosen to be $1$. Why did we elect not to do that in this case?
It's because it wouldn't work.
Intuitively, here's why it doesn't: when you consider the neighborhood of radius $1$ centered around $x = 1$, you get the interval $(0, 2)$. $f(x) = \dfrac{1}{x}$ doesn't have a finite limit at $x = 0$, so this makes $\delta = 1$ a bad choice.
This isn't the case if $\delta = 1/2$. The neighborhood of radius $1/2$ around $x = 1$ is $(1/2, 3/2)$. $f$ has limits at every $x$-value in the interval $(1/2, 3/2)$, including the endpoints.
In terms of the algebra, if we had chosen $\delta = 1$, the algebra wouldn't have worked out. We would've gotten $0 < x < 1$ and would not have been able to obtain a finite upper bound for $\dfrac{1}{x}$. That is,
$$0 < x < 1 \implies 1 < \dfrac{1}{x} < \infty\text{.}$$
We do not have a finite upper bound for $\dfrac{1}{x}$ in this case, and hence why $\delta = 1$ will not work for this purpose.
If $\dfrac{1}{2} <|x| < \dfrac{3}{2}$, then $$\dfrac{2}{3} <\dfrac{1}{|x|} < 2$$ and $$\dfrac{1}{|x|} < 2 \implies \dfrac{\left|x-1 \right|}{\left| x \right|} < 2\left| x-1 \right|\text{.}$$ Now we have control over what $|x-1|$ is less than. So to get $\epsilon$, we choose $\delta = \dfrac{\epsilon}{2}$.
But, wait - didn't I say that we chose $\delta = \dfrac{1}{2}$ earlier? A simple solution would be to minimize $\delta$, i.e., make $\delta = \min\left(\dfrac{\epsilon}{2} , \dfrac{1}{2} \right)$.
Addendum. To see why $\delta = \min\left(\dfrac{\epsilon}{2} , \dfrac{1}{2} \right)$ works, suppose $\dfrac{\epsilon}{2} > \dfrac{1}{2}$, so that $\delta = \dfrac{1}{2}$. Then $\epsilon > 1$. Then $$\dfrac{\left|x-1 \right|}{\left| x \right|} < 2|x-1| < 2 \cdot \dfrac{1}{2} = 1 < \epsilon\text{.}$$
Now suppose $\dfrac{\epsilon}{2} \leq \dfrac{1}{2}$, so that $\delta
= \dfrac{\epsilon}{2}$.
Then $$\dfrac{\left|x-1 \right|}{\left| x \right|} < 2|x-1| < 2 \cdot \dfrac{\epsilon}{2} = \epsilon\text{.}$$
In both cases, we have $\dfrac{\left|x-1 \right|}{\left| x \right|} < \epsilon$, as desired.
See also Why do we need min to choose $\delta$?.
So now we've found our $\delta$ and can use this to write out the proof.
The Proof
Proof. Let $\epsilon > 0$ be given. Choose $\delta := \min\left(\dfrac{\epsilon}{2} , \dfrac{1}{2} \right)$. Then
$$\left|\dfrac{1}{x} - 1 \right| = \left|\dfrac{x-1}{x} \right| =
\dfrac{\left|x-1 \right|}{\left| x \right|} < 2\left| x-1 \right|$$
(since if $|x - 1| < \dfrac{1}{2}$, $\dfrac{1}{|x|} < 2$) and $$2\left| x-1 \right| < 2\delta \leq 2\left(\dfrac{\epsilon}{2}\right) = \epsilon\text{. }\square$$
Success at last.
Addendum. Note that the end goal above was achieved, namely to show that $$\left|\dfrac{1}{x}-1\right| < \epsilon\text{.}$$
In the step $$2\left| x-1 \right| < 2\delta \leq
2\left(\dfrac{\epsilon}{2}\right) = \epsilon\text{,}$$ textbooks
usually omit the step with the $\delta$ and just write $$2\left| x-1
\right| < 2\left(\dfrac{\epsilon}{2}\right) =
\epsilon\text{.}$$
Addendum. It may seem that the note "(since if $|x - 1| < \dfrac{1}{2}$, $\dfrac{1}{|x|} < 2$)" may be an additional assumption added to the problem - i.e., that $\delta$ has to be $\dfrac{1}{2}$. This is not the case for the following reason: given $|x-1| < \delta$, we have
$$|x-1| < \min\left(\dfrac{\epsilon}{2}, \dfrac{1}{2}\right)\text{.} $$
Obviously, if $\epsilon \geq 1$, we end up with $|x - 1| < \dfrac{1}{2}$, as stated above. But let's suppose that $\epsilon < 1$. Then
$$|x - 1| < \dfrac{\epsilon}{2} < \dfrac{1}{2}$$
and you end up with $|x - 1| < \dfrac{1}{2}$, so the $\dfrac{1}{|x|} < 2$ implication holds in either case.
When you choose a value of $\delta$ corresponding to any particular $\varepsilon,$ you are asserting that $2 - \varepsilon < \sqrt x < 2 + \varepsilon$
whenever $4 - \delta < x < 4 + \delta.$
Let's try a concrete example: what happens if $\varepsilon = 0.1$?
If you say that $\delta = 4\varepsilon + \varepsilon^2,$ then you are saying that
you can set $\delta = 4\times 0.1 + 0.1^2 = 0.41$ and then it will be true that
$1.9 = 2 - 0.1 < \sqrt x < 2 + 0.1 = 2.1$ whenever
$3.59 = 4 - 0.41 < x < 4 + 0.41 = 4.41.$
But what if $x = 3.591025$? Then $3.59 < x < 4.41,$ so you have satisfied the
"whenever $4 - \delta < x < 4 + \delta$" condition, but
$\sqrt x = 1.895,$ so it is not true that $1.9 < \sqrt x < 2.1$
In short, the formula $\delta = 4\varepsilon + \varepsilon^2$ does not work
for this particular value of $\varepsilon.$ If you look further into this you should be able to show that the formula does not work for any other values of $\varepsilon$ either.
The thing behind all this is that in a delta-epsilon proof, we only assert the existence of one value of $\delta$ for any particular value of $\epsilon,$
and the same value of $\delta$ has to work in both directions, both below and above the limiting value of $x.$
However, we never said that we have a $\delta$ that gives all values of $x$ for which $L - \varepsilon < f(x) < L + \varepsilon.$
In your proof you don't need to show that
$2 - \varepsilon < \sqrt x < 2 + \varepsilon$
if and only if $4 - \delta < x < 4 + \delta$;
you only need to show the "if" direction.
And this leads into an observation about delta-epsilon proofs in general,
which you may want to repeat as a mantra until you have fully internalized it:
You can never go wrong by choosing $\delta$ "too small", as long as you keep it positive.
This is how we can make use of a definition that requires us to use the same $\delta$ in both directions: even though the complete interval of values of $x$ that satisfy
$L - \varepsilon < f(x) < L + \varepsilon$ may be asymmetric,
we only need to identify a subset of that interval,
and it is always possible to find a symmetric subset of an asymmetric interval around a particular value of $x.$
So you can never go wrong by taking the smaller of two positive values. If the interval of $x$ values is asymmetric, the distance to the farther end of the interval is irrelevant. For that matter, you don't even need to be sure what the exact distance is to the nearer end of the interval. You just need to be sure that whatever that distance is, the $\delta$ you choose is not larger than that distance.
Smaller is fine.
On the other hand you will always go wrong if you choose $\delta$ too large.
Best Answer
You are trying to prove the following. For any given $\epsilon>0$, there exists $\delta>0$ such that when $0<|x-2|<\delta,$ it follows that $|2^x-4|<\epsilon$.
Consider when $x>2$. Since $2^x$ is increasing, $|2^x-4|=2^x-4$ so solving $2^x-4<\epsilon$, this holds iff $2^x<\epsilon+4$ iff $x<\log_2(\epsilon+4)$ iff $x-2<\log_2(\epsilon+4)-2$. The right hand side is positive since $\log_2(\epsilon+4)>\log_2(4)=2$. The if and only ifs allow you to go backwards in the proof. Therefore, for the right limit, it seems appropriate to choose $\delta_1=\log_2(\epsilon+4)-2$.
Now consider when $x<2$. Then it becomes $4-2^x<\epsilon$ iff $4-\epsilon<2^x$ iff $\log_2(4-\epsilon)<x$ iff $-\log_2(4-\epsilon)>-x$ iff $2-\log_2(4-\epsilon)>2-x$ . Thus, for the leftward limit, it seems that $\delta_2=2-\log_2(4-\epsilon)$ works.
For the combined limit, we want $0<|x-2|<\delta$. Choose $\delta=\min\{\delta_1,\delta_2\}$.