$\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,}
\newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
\newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
\newcommand{\dd}{\mathrm{d}}
\newcommand{\ds}[1]{\displaystyle{#1}}
\newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
\newcommand{\ic}{\mathrm{i}}
\newcommand{\mc}[1]{\mathcal{#1}}
\newcommand{\mrm}[1]{\mathrm{#1}}
\newcommand{\pars}[1]{\left(\,{#1}\,\right)}
\newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
\newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
\newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
\newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
\int_{0}^{\infty}{x^{a - 1} - x^{b - 1} \over 1 - x}\,\dd x & =
\int_{0}^{1}{x^{a - 1} - x^{b - 1} \over 1 - x}\,\dd x +
\int_{1}^{\infty}{x^{a - 1} - x^{b - 1} \over 1 - x}\,\dd x
\end{align}
In the RHS second integral I'll perform the change $\ds{x\ \mapsto\ 1/x}$:
\begin{align}
&\bbox[10px,#ffd]{\int_{0}^{\infty}{x^{a - 1} - x^{b - 1} \over 1 - x}\,\dd x}
\\[5mm] = &\
\int_{0}^{1}{x^{a - 1} - x^{b - 1} \over 1 - x}\,\dd x +
\int_{1}^{0}{\pars{1/x}^{a - 1} - \pars{1/x}^{1 - b} \over 1 - 1/x}
\,{\dd x \over -x^{2}}
\\[5mm] = &\
\int_{0}^{1}{x^{a - 1} - x^{b - 1} \over 1 - x}\,\dd x -
\int_{0}^{1}{x^{-a} - x^{-b} \over 1 - x}\,\dd x
\\[5mm] & =
\bbx{\ds{H_{b - 1} - H_{a - 1} + H_{-a} - H_{-b}}}
\quad\mbox{with}\ \Re\pars{a}\,,\ \Re\pars{b} \in \pars{0,1}
\end{align}
$\ds{H_{n}}$ is a Harmonic Number and I used a well known identity ( as given by Euler ): $\ds{H_{z} = \int_{0}^{1}{1 - t^{z} \over 1 - t}\,\dd t}$ with $\ds{\Re\pars{z} > -1}$.
Note that
$\ds{H_{b - 1} - H_{-b} = -\pi\cot\pars{\pi b}}$ such that:
$$
\bbx{\ds{\int_{0}^{\infty}{x^{a - 1} - x^{b - 1} \over 1 - x}\,\dd x =
\pi\cot\pars{\pi a} - \pi\cot\pars{\pi b}}}
$$