Hello,
Note that $\displaystyle \log_a x=\frac{\ln(x)}{\ln(a)}$
So $\displaystyle \log_{\frac ab} x=\frac{\ln(x)}{\ln \left(\tfrac ab\right)}$
but $\displaystyle \ln \frac ab=\ln a-\ln b$ (basic log property)
Hence :
$\displaystyle \frac{\log_a x}{\log_{\frac ab} x}=\frac{\ln(x)}{\ln(a)} \cdot \frac{\ln(a)-\ln(b)}{\ln(x)}=1-\frac{\ln(b)}{\ln(a)}=1-\log_a b=1+\log_a \left(\frac 1b\right)$
(using the rule -log(b)=log(1/b))