Let $ABC$ be an isosceles triangle with inradius $r$, circumradius $R$ and base angle $\alpha$.
The question is to find the distance between circumcentre and incenter.
I know that the distance between $BC$ and incenter is $r$ and the distance between $BC$ and circumcentre is $R\cos {2\alpha}$.
The answer is $ r + R \cos{ 2\alpha } $.
For this to be true, circumcentre will be outside of the triangle and the line joining incenter and circumcenter needs to be perpendicular to BC.
But why this needs to be true??
Since $$\angle BCA = 180°-2\alpha$$ we have $$\angle BOA = 360°-4\alpha$$
so $$\angle DOA = 180°-2\alpha \implies \cos (180°-2\alpha) = {x\over R}$$
so $$\color{lightgreen}{x = -R \cos (2\alpha)}$$
So the distance is $$\color{red}{OI} = |r-x|= \Big|r+R\cos (2\alpha)\Big|$$