I still have difficulties with absolute value, and even if I manage to solve questions and problems, I do that awkwardly.
So, please show me if this is the way to answer this question. Thank you in advance.
$|x-2|<0.001 \iff -0.001<x-2$ or $x-2<0.001$
$$\begin{align}\\-0.001<x-2 & \iff 2-0.001<x\\ &\iff1.999<x\\ &\iff\frac{1}{x}<\frac{1}{1.999}\\ &\iff\frac{1}{x}-\frac{1}{2}<\frac{0.001}{3.998}\\ &\iff \frac{1}{x}-\frac{1}{2}<3\times 10^{-3}\end{align}$$
$$\begin{align}\\ x-2<0.001 &\iff x<2.001\\ &\iff\frac{1}{x}>\frac{1}{2.001}\\ &\iff\frac{1}{x}-\frac{1}{2}>\frac{3.002}{2}\\ &\iff\frac{1}{x}-\frac{1}{2}>-3\times10^{-3}\end{align}$$
We have: $-3\times 10^{-3}<\frac{1}{x}-\frac{1}{2}<3\times10^{-3}$
Then, $|\frac{1}{x}-\frac{1}{2}|<3\times10^{-3}$
Your work is correct. Also, you can simply write:
We have by the triangle inequality $$2-|x|\le |2-x|<0.001\implies 3.998<|2x|$$ so
$$\left|\frac1x-\frac12\right|=\frac{|2-x|}{|2x|}<\frac{0.001}{3.998}<3\cdot 10^{-3}$$