Answer
$a)$ For $p<1$ the integral converges
$b)$ For $p>1$ the integral converges.
Work Step by Step
Part $a)$:
\[
\int\limits_{1}^{2}\frac{dx}{x(\ln x)^p}
\]
with $x\in(0,+\infty)$. Let $u=\ln x$, then $du=\frac{dx}{x}$. Therefore
\begin{align*}
\int\limits_{1}^{2}\frac{dx}{x(\ln x)^p} & = \int\limits_{\ln2}^{0}\frac{du}{u^p}=I
\end{align*}
If $p=1$ we got
\begin{align*}
I & = \lim_{t\to 0^+}\int\limits_{t}^{\ln2}\frac{du}{u}\\
& = \lim_{t\to 0^+}\left(\ln(\ln2)-\ln |t|\right)
\end{align*}
where $\displaystyle\lim_{t\to 0^+}\ln|t|=-\infty$, so $I=+\infty$. Now, if $p\neq 1$ we have
\begin{align*}
I & = \lim_{t\to 0^+}\int\limits_{t}^{\ln2}\frac{du}{u^p}\\
& = \lim_{t\to 0^+}\frac{u^{1-p}}{1-p}\Bigg|_{t}^{\ln2}\\
& = \lim_{t\to 0^+}\left(\frac{(\ln2)^{1-p}}{1-p}-\frac{t^{1-p}}{1-p}\right)
\end{align*}
if $1-p>0$ we have $\displaystyle \lim_{t\to 0^+}\frac{t^{1-p}}{1-p}=0$. In the oter hand, if $1-p<0$ we have $\displaystyle \lim_{t\to 0^+}\frac{t^{1-p}}{1-p}=-\infty$. Therefore, when $1-p>0\Leftrightarrow p<1$, the integral converges.
Part $b)$:
\[
\int\limits_{2}^{+\infty}\frac{dx}{x(\ln x)^p}
\]
Taking the same change of variable as in the previous literal, we have
\[
\int\limits_{2}^{+\infty}\frac{dx}{x(\ln x)^p}=\lim_{t\to +\infty}\int\limits_{\ln2}^{\ln t}\frac{du}{u^p}=I
\]
If $p=1$
\begin{align*}
I & = \lim_{t\to+\infty}\ln|u|\Bigg|_{\ln2}^{\ln t}\\
& = \lim_{t\to+\infty}\left(\ln (\ln t)-\ln(\ln 2)\right)
\end{align*}
with $\displaystyle \lim_{t\to+\infty}\ln(\ln t)=+\infty$, $I=+\infty$.
If $p\neq 1$:
\begin{align*}
I & = \lim_{t\to 0^+}\frac{u^{1-p}}{1-p}\Bigg|_{\ln 2}^{\ln t}\\
& = \lim_{t\to 0^+}\left(\frac{(\ln t)^{1-p}}{1-p}-\frac{(\ln 2)^{1-p}}{1-p}\right)
\end{align*}
So, when $1-p>0$, $\displaystyle \lim_{t\to+\infty}(\ln t)^{1-p}=+\infty$, i.e. $I=+\infty$, but if $1-p<0$ we have $\displaystyle \lim_{t\to+\infty}(\ln t)^{1-p}=0$. Therefore, when $1-p<0\Leftrightarrow p>1$, the integral converges.