What motivates the choice of $\delta$ to determine the openness of a set? Question

I am trying to prove this using balls (that is what we use in my school). The definition is that a subset $A$ is open if $\forall a \in A$ $  \exists$ r such that $B_r(a) \subseteq A $.
Textbook Solution

Confusion
This is the answer my book gave but the problem is that I don't understand why we chose $\delta=1-||(x-1)^2-(y+2)^2||$ . Looking at the condition for $(x,y)$ to be in $A$ I realized that for $a=(-1,2)$ then we could have $r=1$ and $B_1((-1,2))={(x,y)\in R :||(x,y)-(-1,2)||<1 }$ so $a=(-1,2)$ is open. but I don't see why we chose that $\delta$.
Note: I am not saying I don't agree with it. I just don't understand the trick to know the $\delta$ to choose.
 A: I think this misstatement

so $a=(-1,2)$ is open

is a big part of your problem. You are not trying to say that particular points in the set $B$ are open. You are trying to show that each particular point is the center of some disk entirely inside $B$.
You've done that correctly for the center of $B$.
For each (other) point   $a \in B$, think geometrically about the radius of  a circle about $a$ that's entirely contained in $B$. That's the $\delta$ you want.
A: Lets reason geometrically. We're given the ball $B_1((1,-2))$ and some point $(x,y)$ in that ball. We need to find a new ball $B_\delta((x,y))$ with $B_\delta((x,y)) \subset B_1((1,-2))$ and the value of $\delta$ should rely on which $(x,y)$ we choose since points close to the edge will need a smaller delta than those near the center.
In fact we can find the shortest path from $(x,y)$ to the boundary of $B_1((1,-2))$ by drawing a line through the center and $(x,y)$.  The segment from the center to $(x,y)$ is $\vert \vert  (x,y)-(1,-2)  \vert \vert$ long which means the remaining distance from $(x,y)$ to the boundary of $1-\vert \vert  (x,y)-(1,-2) \vert \vert$. In fact $B_\delta((x,y))$ shared a boundary point with $B_1((1,-2))$ so it's the largest possible $\delta$ you can choose.
