For a programming purpose I've been asked to plot few points next to a point on a circular diagram. The only given values are the reference point coordinates and distance from/to of the new point to plot based on the reference point and the center coordinates. So how can I find the nearest points on the circumference with that data only?
This is the diagram. Also Ive been given the radius too.

Little update based on a comment So as a summary, I've the coordinates of the reference point Q on the circumference and I need to plot P in specific given distance from Q. Also radius r is given.
Your comments indicate you want a more general case than that in the diagram. I assume that $0<d<2r$ so that there are always two solutions.
For radius $r$, centre $(h,k)$, we are looking for a point $(x,y)$. I assume the reference point $(a,b)$ is still a distance $r$ from the centre. We start by taking coordinates relative to the centre: $X=x-h,Y=y-k,A=a-h,B=b-k$.
We have $X^2+Y^2=r^2,A^2+B^2=r^2,(X-A)^2+(Y-B)^2=d^2$. Subtracting the last from the first we get $2AX+2BY=2r^2-d^2$. Substituting for $Y$ into $X^2+Y^2=r^2$ we get: $$r^2X^2-A(2r^2-d^2)X+\frac{(2r^2-d^2)^2}{4}-r^2(r^2-A^2)=0$$ Solutions: $$X=A-\frac{Ad^2}{2r^2}\pm\frac{d\sqrt{(r^2-A^2)(4r^2-d^2)}}{2r^2}$$ Reverting to the usual coordinates, we get $$x=a-\frac{(a-h)d^2}{2r^2}\pm\frac{d\sqrt{(r^2-(a-h)^2)(4r^2-d^2)}}{2r^2}$$ Having found the two possible values of $x$ you get the corresponding $y$ from the linear equation $2(a-h)(x-h)+2(b-k)(y-k)=2r^2-d^2$.