As I answered your previous question (thanks for your acceptance), I feel I should clarify things. So let me try at my best.
First of all it looks (from your previous question) you are trying to get some sort of program which would take the following inputs: $x_1,x_2,y_1y_2,d_1,d_2$ and output the point $p$ if it exists (or some variant of this). I will try to put the algorithm at the end of this answer. Lets first clarify when there will be a solution and when not.
So, we have two equations in hand $(x-x_1)^2+(y-y_1)^2=d_1^2\quad\cdots(1)$ $(x-x_2)^2+(y-y_2)^2=d_2^2\quad\cdots(2)$ Subtracting (2) from (1), we get a linear equation of the form $ax+by=c\quad\cdots(3)$ where $a=2(x_2-x_1),b=2(y_2-y_1),c=d_1^2-d_2^2-x_1^2-y_1^2+x_2^2+y_2^2\quad\cdots(4)$
Note that for distinct points, at least one of $a,b$ is non zero, WLOG, say $b$. Now substituting the value of $y(=\frac{c-ax}{b})$ into (1), we get a quadratic equation of the form $Ax^2+Bx+C=0\quad\cdots(5)$ where $A=a^2+b,B=2(aby_1-ac-bx_1), C=bx_1^2+(by_1-c)^2-d_1^2b^2\quad\cdots(6)$ We are almost done now. Note that the equation (5) has a (REAL) solution (which would imply the point $p$ exists) iff either $A=0$, Or $(A,B)\ne(0,0)$ and $D=B^2-4AC\ge0\quad\cdots(7)$ So, assuming$A^2+B^2\ne 0$, there exists no $p$ if $D<0$, a unique $p$ if $D=0$ and two $p$s if $D>0$.
A very rough algorithm: (My apology, I don't know much about these)
Input $x_i,y_i,d_i$
Define $a,b,c$ as given in (4)
If $b\ne0$
Define $A,B,C,D$ as given in (6) and (7)
Else Define $A,B,C,D$ assuming $a\ne0$ in (3) *\Note that we use the same variable $A,B,C$
If ($A^2+B^2=0$, or $D<0$): No $p$ exists
Else If $A=0$: Unique $p$ *\The expression for $p$ may change on the assumption $a,b\ne0$ in (3), though
Else If $D=0$: Unique $p$
Else: Two distinct $p$.
Final comments: 1. I hope now you can do it far better than me. 2. There may lots of typo, I do them very often. 3. Anyone wish to improve, change, edit this answer is warmly welcome.