Prove $A=B=\pi$
Solution 1:
For any $a \ge 1$, let $f_n(a)$ be the expression
$$f_n(a) \stackrel{def}{=}\frac{(a+a^{-1})(\phi^{n-1/2} + \phi^{1/2-n})}{a^2 + a^{-2} - 1 + \phi^{2n-1} + \phi^{1-2n}}$$
The sums at hand equal to $\sum\limits_{n=1}^\infty \tan^{-1}f_n(e)$ and $\sum\limits_{n=1}^\infty \tan^{-1}f_n(\gamma^{-1})$ respectively.
For any $n \ge 0$, let $p_n = \phi^{n-1/2} - \phi^{1/2-n}$. It is easy to verify
- $p_{n+1} - p_{n-1} = (\phi - \phi^{-1})(\phi^{n-1/2} + \phi^{1/2-n}) = \phi^{n-1/2} + \phi^{1/2-n}$
- $p_{n+1} p_{n-1} = (\phi^{n+1/2} - \phi^{-1/2-n})(\phi^{n-3/2} - \phi^{3/2-n}) = \phi^{2n-1} + \phi^{1-2n} - 3$
Let $u = a + a^{-1}$. Notice
$$\frac{\frac{u}{p_{n-1}} - \frac{u}{p_{n+1}}}{ 1 + \frac{u}{p_{n-1}} \frac{u}{p_{n+1}} } = \frac{u(p_{n+1}-p_{n-1})}{u^2 + p_{n+1}p_{n-1}} = \frac{(a+a^{-1})(\phi_{n-1/2} + \phi_{1/2-n})}{a^2 + a^{-2} - 1 + \phi^{2n-1} + \phi^{1-2n}} = f_n(a) $$ There exists integers $N_n$ such that $$\tan^{-1} f_n(a) = \tan^{-1} \left(\frac{\frac{u}{p_{n-1}} - \frac{u}{p_{n+1}}}{ 1 + \frac{u}{p_{n-1}} \frac{u}{p_{n+1}} }\right) = \tan^{-1}\frac{u}{p_{n-1}} - \tan^{-1}\frac{u}{p_{n+1}} + N_n \pi $$
When $n > 1$, $p_{n+1} > p_{n-1} > 0$, it is easy to see $N_n = 0$.
When $n = 1$, we have
$$
\begin{cases}
f_1(a), \frac{u}{p_2} > 0\\
\frac{u}{p_0} < 0
\end{cases}
\quad\implies\quad
\begin{cases}
\tan^{-1}f_1(a), \tan^{-1}\frac{u}{p_2} \in (0,\frac{\pi}{2})\\
\tan^{-1}\frac{u}{p_0} \in (-\frac{\pi}{2},0)
\end{cases}
\quad\implies\quad
N_1 = 1
$$
This implies
$$\begin{align}
& \sum_{n=1}^\infty \tan^{-1}f_n(a)\\
= & \sum_{m=1}^\infty \left( \tan^{-1}f_{2m-1}(a) + \tan^{-1}f_{2m}(a)\right)\\
= & \pi + \lim_{N\to\infty}\sum_{m=1}^N\left[\left( \tan^{-1}\frac{u}{p_{2m-2}} - \tan^{-1}\frac{u}{p_{2m}}\right) + \left( \tan^{-1}\frac{u}{p_{2m-1}} - \tan^{-1}\frac{u}{p_{2m+1}}\right)\right]\\
= & \pi + \lim_{N\to\infty}
\left[
\left(\tan^{-1}\frac{u}{p_0} + \tan^{-1}\frac{u}{p_1}\right)
-
\left(\tan^{-1}\frac{u}{p_{2N}} + \tan^{-1}\frac{u}{p_{2N+1}}\right)
\right]\\
= & \pi + \left(\tan^{-1}\frac{u}{p_0} + \tan^{-1}\frac{u}{p_1}\right)
\end{align}
$$
Notice $p_0 = -p_1$, the last bracket vanishes. As a result,
$$\sum_{n=1}^\infty \tan^{-1}f_n(a) = \pi\quad\text{ for all } a \ge 1$$
As pointed out by @Winther, we can relax the condition from $a \ge 1$ to $a > 0$.
This is because for $a \in (0,1)$, $f_n(a) = f_n(a^{-1})$.
We can generalize this a little bit. Let $g_n(u)$ be the expression
$$g_n(u) \stackrel{def}{=} \frac{u(\phi^{n-1/2} + \phi^{1/2-n})}{ u^2 + (\phi^{n-1/2} + \phi^{1/2-n})^2 - 5}$$
We have $f_n(a) = g_n(a + a^{-1})$. If we adopt the convention that $\tan^{-1}(\mathbb{R}) = \left(-\frac{\pi}{2}, \frac{\pi}{2} \right]$,
i.e $\tan^{-1}\infty = \frac{\pi}{2}$ and $\tan^{-1}x < 0$ for $x < 0$, we have
$$\sum_{n=1}^\infty \tan^{-1}g_n(u) = \begin{cases} \pi, & u_c \le u\\ 0, & 0 < u < u_c \end{cases} \quad\text{ where }\quad u_c = \sqrt{3-\sqrt{5}} $$
For all $u > 0$, the analysis is essentially the same as above. When $u < u_c$, there is one place we need to adjust the argument. Namely, $g_1(u)$ becomes $-ve$ and this forces the corresponding $N_1$ to vanish. At the end, when $u < u_c$, this causes the $\pi$ term disappear from above sum.