Let the two circles be $x^2+y^2+2gx+2fy+c=0$ and $x^2+y^2+2g_1x+2f_1y+c_1=0$

If the circles intersect at P then angle $\theta$ is

the angle between the tangents to both the circles at the point P.

$C_1$ and $C_2$ are centres of the circles.

$\Rightarrow\:C_1(-g,-f),C_2(-g_1,-f_1)$ and

Radius are given by $ r_1=\sqrt{g^2+f^2-c},r_2=\sqrt{g_1^2+f_1^2-c_1}$

$d=|C_1C_2|$=distance between the centres

$\Rightarrow \sqrt{g^2+f^2+g_1^2+f_1^2-2gg_1-2ff_1}$

In $\Delta C_1PC_2$

$\cos \alpha=\big(\large\frac{r_1^2+r_2^2-d^2}{2r_1r_2}\big)$

where $\alpha$ is the angle $C_1PC_2$

$\theta$ is the angle $A'PB'$

$\alpha+\theta+90^{\large\circ}+90^{\large\circ}=360^{\large\circ}$

$\theta=180^{\large\circ}-\alpha$

So $\cos(180^{\large\circ}-\theta)=\large\frac{r_1^2+r_2^2-d^2}{2r_1r_2}$

Hence (a) is the correct answer.