Common chord of two circles
Let us denote the radius of circle with center $A$ as $r_{1}$ and circle with center $C$ as $r_{2}$, and $AC=d$ as the distance between the centers.
Now note by SAS criteria (prove $\triangle ADC$ and $\triangle ABC$ are congruent by SSS and ...) that $\triangle ABE$ and $\triangle ADE$ are congruent. Thus $\angle AEB = \angle AED$, but since $\angle AEB + \angle AED = 180^{\circ}$, we have $\angle AEB = \angle AED = 90^{\circ}$. Similarly, $\angle BEC = \angle DEC= 90^{\circ}$.
Thus, we can see that $BE$ is the height of $\triangle ABC$, and $DE$ is the height of $\triangle ADC$, with base $AC$. So,
$$BD=BE+DE=\frac{2(ABC)}{AC} + \frac{2(ADC)}{AC}=\frac{4}{d}(ABC)$$
Where $(ABC)$ and $(ADC)$ represents the area of the respective triangles, which we can calculate in terms of $r_{1},r_{2},d$ using the Herons formula. This is the general formula which gives the length of the common chord, $BD$. I leave the proof of the above formula above as a exercise for you.
However, your formula was for a special case, when $\angle ABC = \angle ADC= 90^{\circ}$. This simplifies the area of the triangles and gives:
$$BC=\frac{4}{d}(ABC)=\frac{2r_{1}r_{2}}{d}$$
Since, in your first question, the pair $(r_{1},r_{2},d)$ was $(15,20,25)$, which is a Pythagorean triple, so the condition $\angle ABC = \angle ADC= 90^{\circ}$ held, and so did your formula. Now lets come to the second question, with a new diagram:
I leave it as a exercise to you to prove that $r_{1}=r_{2}=AB=AC=BC$. Hence, $ABC$ is an equilateral triangle with $\angle ABC = 60^{\circ} \neq 90^{\circ}$. Hence your formula does not hold, and we must return to the general formula:
$$AD=\frac{4}{d}(ABC)=\frac{4}{d}\frac{\sqrt{3}(AC)^2}{4}=\frac{\sqrt{3}(r_{1})^2}{r_{1}}=\sqrt{3}r_{1}$$
What I essentially did in the second last step, was to use the Pythagoras theorem, like the way you must have did, to find the altitude in terms of the side, $r_{1}$, and use it to find the area of the triangle, or we can directly find $AD$ from the height.