Step 1: Understanding the Question:
The problem involves evaluating an expression containing inverse trigonometric compositions. We must simplify each term by respecting the principal value branches of the inverse trigonometric functions.
Step 2: Key Formula or Approach:
The principal value branch for $\tan^{-1}(x)$ is $\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$. Thus, $\tan^{-1}(\tan \theta) = \theta$ only if $\theta \in \left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$.
The principal value branch for $\cos^{-1}(x)$ is $[0, \pi]$. Thus, $\cos^{-1}(\cos \phi) = \phi$ only if $\phi \in [0, \pi]$.
Use trigonometric reduction formulas to bring the angles within these intervals: $\tan(\pi - \alpha) = -\tan\alpha$ and $\cos(2\pi + \alpha) = \cos\alpha$.
Step 3: Detailed Explanation:
Let's analyze the first term: $\tan^{-1}\left(\tan \frac{5\pi}{6}\right)$.
Since $\frac{5\pi}{6}$ lies outside $\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$, we rewrite the angle:
$$\tan\left(\frac{5\pi}{6}\right) = \tan\left(\pi - \frac{\pi}{6}\right) = -\tan\left(\frac{\pi}{6}\right) = \tan\left(-\frac{\pi}{6}\right)$$
Now apply the inverse function, since $-\frac{\pi}{6}$ falls perfectly within the required principal range:
$$\tan^{-1}\left(\tan \left(-\frac{\pi}{6}\right)\right) = -\frac{\pi}{6}$$
Let's analyze the second term: $\cos^{-1}\left(\cos \frac{13\pi}{6}\right)$.
Since $\frac{13\pi}{6}$ is greater than $\pi$, we reduce it using its periodicity:
$$\cos\left(\frac{13\pi}{6}\right) = \cos\left(2\pi + \frac{\pi}{6}\right) = \cos\left(\frac{\pi}{6}\right)$$
Now apply the inverse function, since $\frac{\pi}{6}$ falls perfectly within $[0, \pi]$:
$$\cos^{-1}\left(\cos \left(\frac{\pi}{6}\right)\right) = \frac{\pi}{6}$$
Adding the two evaluated terms together:
$$\text{Value} = \left(-\frac{\pi}{6}\right) + \left(\frac{\pi}{6}\right) = 0$$
Step 4: Final Answer:
The value of the expression is $0$, which matches option (A).