Seat your belt, it will be great...
You can use your $d^2 = R(R-2r)$, which gives you
$(c-b)^2 = 2d^2 = 2R(R-2r) = 2R^2-4rR$
Then, you remark that the area of the triangle can be obtained with $r$ or with $R$ :
$\displaystyle\text{Area} = \frac{(a+b+c)r}{2}$ and $\displaystyle\text{Area} = \frac{ab\sin{C}}{2} = \frac{abc}{4R}$
So you have $\displaystyle\frac{(a+b+c)r}{2} = \frac{abc}{4R}$, thus $\displaystyle2rR=\frac{abc}{a+b+c}$
Putting it in the first equality gives :
$\displaystyle c^2+b^2-2bc = 2R^2-2\frac{abc}{a+b+c}$
But $\displaystyle \frac{b}{\sin{B}} = 2R$ and $\displaystyle\sin{B} = \frac{\sqrt{2}}{2}$, so $b=\sqrt{2}R$ and
$\displaystyle c^2+b^2-2bc = b^2-2\frac{abc}{a+b+c}$
$\displaystyle\Leftrightarrow c^2 - 2bc = -2\frac{abc}{a+b+c}$
$\displaystyle\Leftrightarrow c - 2b = -2\frac{ab}{a+b+c}$
$\displaystyle\Leftrightarrow (c - 2b)(a+b+c) = -2ab$
$\displaystyle\Leftrightarrow ac+bc+c^2-2ab-2b^2-2bc = -2ab$
$\displaystyle\Leftrightarrow ac+c^2-2b^2-bc = 0$
Now, we can use $a = 2R\sin A$, $b = 2R\sin B$, and $c = 2R\sin C$ to
$\displaystyle \sin A \sin C+\sin^2 C-2\sin^2 B-\sin B \sin C = 0$
$\displaystyle\Leftrightarrow \sin A \sin C+\sin^2 C-1-\frac{\sqrt{2}}{2} \sin C = 0$
We also know that
$\sin C = \sin(180°-45°-A) = \sin 135° \cos A - \sin A \cos 135° = \frac{\sqrt{2}}{2}(\cos A + \sin A)$
Thus,
$\displaystyle \sin A \frac{\sqrt{2}}{2}(\cos A + \sin A)+\frac{1}{2}(\cos A + \sin A)^2-1- \frac{1}{2}(\cos A + \sin A) = 0$
$\displaystyle\Leftrightarrow \sqrt{2} \sin A \cos A + \sqrt{2}\sin^2 A+\cos^2 A + \sin^2 A + 2\sin A \cos A-2- \cos A - \sin A = 0$
$\displaystyle\Leftrightarrow (2+\sqrt{2}) \sin A \cos A + \sqrt{2}\sin^2 A -1 - \cos A - \sin A = 0$
To only have $\sin$, we can isolate $\cos A$ and square terms...
$\sqrt{2}\sin^2 A - \sin A - 1 = \cos A (1 - (2+\sqrt{2}) \sin A)$
$\Rightarrow (\sqrt{2}\sin^2A - \sin A - 1)^2 = \cos^2 A (1 - (2+\sqrt{2}) \sin A))^2$
Let $x = \sin A$ :
$(\sqrt{2}x^2-x-1)^2 = (1-x^2)(1 - (2+\sqrt{2}) x)^2$
$\Leftrightarrow 2x^4+x^2+1-2\sqrt{2}x^3-2\sqrt{2}x^2+2x = (1-x^2)(1 - (4+2\sqrt{2})x + (6+4\sqrt{2})x^2)$
$\Leftrightarrow 2x^4-2\sqrt{2}x^3+(1-2\sqrt{2})x^2+2x+1 = -(6+4\sqrt{2}) x^4 + (4+2\sqrt{2})x^3+(5+4\sqrt{2})x^2 - (4+2\sqrt{2})x + 1$
$\Leftrightarrow (8+4\sqrt{2})x^4-(4+4\sqrt{2})x^3-(4+6\sqrt{2})x^2+(6+2\sqrt{2})x = 0$
A solution is $x = 0$ which is impossible so it gives us :
$(4+2\sqrt{2})x^3-(2+2\sqrt{2})x^2-(2+3\sqrt{2})x+(3+\sqrt{2}) = 0$
Aaaand... I don't want to find the solution, especially since I've probably make a mistake somewhere :D. There surely is something shorter but perhaps It could help you to find a nice solution!