Given that$:\log _{x}(a-b)-\log _{x}(a+b)=\log _{x}\left(\dfrac{b}{a}\right)$
$\implies \log _{x}\left(\dfrac{a-b}{a+b}\right) = \log _{x}\left(\dfrac{b}{a}\right)\:\:\left[\because\log_{x}a – \log_{x}b = \log_{x}\left(\dfrac{a}{b}\right)\right]$
$\implies \dfrac{a-b}{a+b} = \dfrac{b}{a}$
$\implies a(a-b) = b(a+b)$
$\implies a^{2} – ab = ab + b^{2}$
$\implies a^{2} – b^{2} = 2ab\rightarrow(1)$
Divide both sides by $b^{2}$ in equation $(1)$ and we get,
$\implies\dfrac{a^{2}}{b^{2}} – \dfrac{b^{2}}{b^{2}} = \dfrac{2ab}{b^{2}}$
$\implies\dfrac{a^{2}}{b^{2}} – 1= \dfrac{2a}{b}\rightarrow(2)$
Divide both sides by $a^{2}$ in equation $(1)$ and we get,
$\implies\dfrac{a^{2}}{a^{2}} – \dfrac{b^{2}}{a^{2}} = \dfrac{2ab}{a^{2}}$
$\implies 1 – \dfrac{b^{2}}{a^{2}} = \dfrac{2b}{a}\rightarrow(3)$
From equation $(2)$ we subtract the equation $(3)$ and get,
$\implies\dfrac{a^{2}}{b^{2}} – 1 – 1 + \dfrac{b^{2}}{a^{2}} = \dfrac{2a}{b} – \dfrac{2b}{a}$
$\implies\dfrac{a^{2}}{b^{2}} + \dfrac{b^{2}}{a^{2}} - 2 = \dfrac{2a^{2} – 2b^{2}}{ab}$
$\implies\dfrac{a^{2}}{b^{2}} + \dfrac{b^{2}}{a^{2}} - 2 = \dfrac{2(a^{2} – b^{2})}{ab}$
$\implies\dfrac{a^{2}}{b^{2}} + \dfrac{b^{2}}{a^{2}} - 2 = \dfrac{2(2ab)}{ab}\:\:\:[\because\text{From equation}\: (1)]$
$\implies\dfrac{a^{2}}{b^{2}} + \dfrac{b^{2}}{a^{2}} = 4 + 2 = 6$
So, the correct answer is $(D).$