Not sure if efficient, but here is how I would do it:
Rewrite the ellipse as a function: $$f_{1,2}(x):=\pm\frac{1}{2} \sqrt{r^2-x^2}$$
Using the distance formula, we get the following functions: $$d_{1,2}(x):=\sqrt{(f_{1,2}(x)-y_0)^2+(x-x_0)^2}$$
Now we minimize $d_{1,2}(x)$ by solving ${d_{1,2}}'(x)=0$:
Suppose $A$ is $(1,1)$ and $r=1$, so we use $f_1(x)$: $$d_1(x)=\sqrt{\left(\frac{\sqrt{1-x^2}}{2}-1\right)^2+(x-1)^2}\\d_1'(x)=\frac{x \left(\frac{1}{\sqrt{1-x^2}}+\frac{3}{2}\right)-2}{\sqrt{3 x^2-4 \sqrt{1-x^2}-8 x+9}}=0\tag{1}$$
Which gives one solution: $$\{\{x\to 0.69282\}\}$$
Plug this in $f_1(x)$ and we get $B(x,y)$ as: $$B(x,y)=\{0.69282,0.360555\}$$
If you have trouble solving for $x$ in$(1)$, you can always use numerical methods like Newton-Raphson.