Step 1: Differentiate given expression.
\[
\frac{d}{dx}\left(a\tan^{-1}x\right)=\frac{a}{1+x^2}
\]
Now:
\[
\frac{d}{dx}\left[b\log\left(\frac{x-1}{x+1}\right)\right]
=b\cdot\frac{d}{dx}\left[\log(x-1)-\log(x+1)\right]
\]
\[
=b\left(\frac{1}{x-1}-\frac{1}{x+1}\right)
=b\left(\frac{(x+1)-(x-1)}{x^2-1}\right)
=\frac{2b}{x^2-1}
\]
So total derivative:
\[
\frac{a}{1+x^2}+\frac{2b}{x^2-1}
\]
Step 2: Write RHS using partial fractions.
\[
\frac{1}{x^4-1}=\frac{1}{(x^2-1)(x^2+1)}
\]
Assume:
\[
\frac{1}{(x^2-1)(x^2+1)}=\frac{A}{x^2+1}+\frac{B}{x^2-1}
\]
Multiply both sides by \((x^2-1)(x^2+1)\):
\[
1=A(x^2-1)+B(x^2+1)
\]
\[
1=(A+B)x^2+(-A+B)
\]
Compare coefficients:
\[
A+B=0 \Rightarrow B=-A
\]
\[
-B+A? \Rightarrow -A+B=1
\]
Substitute \(B=-A\):
\[
-A-A=1 \Rightarrow -2A=1 \Rightarrow A=-\frac{1}{2}
\]
\[
B=\frac{1}{2}
\]
Thus:
\[
\frac{1}{x^4-1}=-\frac{1}{2(x^2+1)}+\frac{1}{2(x^2-1)}
\]
Step 3: Compare with derivative.
\[
\frac{a}{x^2+1}+\frac{2b}{x^2-1}=-\frac{1}{2(x^2+1)}+\frac{1}{2(x^2-1)}
\]
So:
\[
a=-\frac{1}{2},\quad 2b=\frac{1}{2}\Rightarrow b=\frac{1}{4}
\]
Step 4: Compute \(a-2b\).
\[
a-2b=-\frac{1}{2}-2\cdot\frac{1}{4}
=-\frac{1}{2}-\frac{1}{2}=-1
\]
Final Answer:
\[
\boxed{-1}
\]