[proofplan]
We first define a weighted Chebyshev function for the residue class $a \pmod q$ and prove its first-order asymptotic. The analytic input is the Dirichlet-character Tauberian argument: after the relevant Dirichlet series and character functions are defined below, character orthogonality isolates the simple pole of the principal character and boundary nonvanishing removes every nonprincipal boundary singularity. Partial summation then removes the logarithmic weight and gives the stated logarithmic-integral asymptotic.
[/proofplan]
[step:Define the weighted counting functions in the residue class]
Let $\Lambda: \mathbb N\to\mathbb R$ denote the von Mangoldt function, defined by $\Lambda(n)=\log p$ if $n=p^k$ for a prime $p$ and an integer $k\in\mathbb N$, and $\Lambda(n)=0$ otherwise. Define
\begin{align*}
\psi_{q,a}: [1,\infty) &\to \mathbb R, \\
x &\mapsto \sum_{\substack{n\le x \\ n\equiv a\pmod q}} \Lambda(n),
\end{align*}
and define
\begin{align*}
\theta_{q,a}: [1,\infty) &\to \mathbb R, \\
x &\mapsto \sum_{\substack{p\le x \\ p\text{ prime} \\ p\equiv a\pmod q}} \log p.
\end{align*}
The hypothesis $\gcd(a,q)=1$ ensures that every prime power $p^k\equiv a\pmod q$ has $p\nmid q$, so this residue class belongs to the reduced residue classes modulo $q$.
[/step]
[step:Verify the Tauberian hypotheses for the Dirichlet series of $\psi_{q,a}$]
Let $\mathcal X(q)$ denote the finite set of Dirichlet characters modulo $q$, and let $\chi_0\in\mathcal X(q)$ denote the principal character. For each $\chi\in\mathcal X(q)$, define its Dirichlet $L$-function by
\begin{align*}
L_{\chi}: \{s\in\mathbb C: \operatorname{Re}(s)>1\} &\to \mathbb C, \\
s &\mapsto \sum_{n=1}^{\infty} \frac{\chi(n)}{n^s}.
\end{align*}
Define the Dirichlet series attached to $\psi_{q,a}$ by
\begin{align*}
A_{q,a}: \{s\in\mathbb C: \operatorname{Re}(s)>1\} &\to \mathbb C, \\
s &\mapsto \sum_{n=1}^{\infty}\frac{\mathbb 1_{\{n\equiv a\pmod q\}}\Lambda(n)}{n^s}.
\end{align*}
Its coefficients are nonnegative because $\Lambda(n)\ge0$ for every $n\in\mathbb N$. Since $\gcd(a,q)=1$, the [Character Decomposition of Reduced Arithmetic Progressions](/theorems/TEMP-33) gives, for every $n\in\mathbb N$,
\begin{align*}
\mathbb 1_{\{n\equiv a\pmod q\}}
=\frac{1}{\varphi(q)}\sum_{\chi\in\mathcal X(q)}\overline{\chi(a)}\chi(n).
\end{align*}
Absolute convergence in $\operatorname{Re}(s)>1$ permits termwise substitution, and the [Logarithmic Derivative Formula for Dirichlet $L$-Functions](/theorems/TEMP-46) gives
\begin{align*}
A_{q,a}(s)
&=\frac{1}{\varphi(q)}\sum_{\chi\in\mathcal X(q)}\overline{\chi(a)}\sum_{n=1}^{\infty}\frac{\chi(n)\Lambda(n)}{n^s}\\
&=\frac{1}{\varphi(q)}\sum_{\chi\in\mathcal X(q)}\overline{\chi(a)}\left(-\frac{L_{\chi}'(s)}{L_{\chi}(s)}\right).
\end{align*}
By the [Principal Character Pole](/theorems/TEMP-39), the principal term $-L_{\chi_0}'/L_{\chi_0}$ has a simple pole at $s=1$ with residue $1$ and is otherwise holomorphic on a neighbourhood of every point of the boundary line $\operatorname{Re}(s)=1$. By the [Boundary Nonvanishing for Dirichlet $L$-Functions](/theorems/TEMP-47), for every nonprincipal $\chi\in\mathcal X(q)$ the quotient $-L_{\chi}'/L_{\chi}$ extends holomorphically to a neighbourhood of every point of the same boundary line. Since $\chi_0(a)=1$, it follows that
\begin{align*}
A_{q,a}(s)-\frac{1}{\varphi(q)(s-1)}
\end{align*}
extends holomorphically to a neighbourhood of every point on $\operatorname{Re}(s)=1$. The [Newman Tauberian Theorem](/theorems/TEMP-31), in its Wiener-Ikehara form for nonnegative Dirichlet coefficients, therefore applies to $A_{q,a}$ and gives
\begin{align*}
\psi_{q,a}(x)\sim \frac{x}{\varphi(q)}
\end{align*}
as $x\to\infty$.
[guided]
We must verify the Tauberian theorem on the actual Dirichlet series whose summatory function is $\psi_{q,a}$. Let $\mathcal X(q)$ be the finite set of Dirichlet characters modulo $q$, and let $\chi_0\in\mathcal X(q)$ be the principal character. For each $\chi\in\mathcal X(q)$, define
\begin{align*}
L_{\chi}: \{s\in\mathbb C: \operatorname{Re}(s)>1\} &\to \mathbb C, \\
s &\mapsto \sum_{n=1}^{\infty} \frac{\chi(n)}{n^s}.
\end{align*}
The series to which the Tauberian theorem will be applied is
\begin{align*}
A_{q,a}: \{s\in\mathbb C: \operatorname{Re}(s)>1\} &\to \mathbb C, \\
s &\mapsto \sum_{n=1}^{\infty}\frac{\mathbb 1_{\{n\equiv a\pmod q\}}\Lambda(n)}{n^s}.
\end{align*}
Its coefficients are nonnegative: the indicator is either $0$ or $1$, and $\Lambda(n)\ge0$. This is the positivity hypothesis needed for the Wiener-Ikehara Tauberian conclusion.
The congruence condition is isolated by the [Character Decomposition of Reduced Arithmetic Progressions](/theorems/TEMP-33). The theorem applies because $\gcd(a,q)=1$, so $a$ is a reduced residue class modulo $q$. It gives, for every $n\in\mathbb N$,
\begin{align*}
\mathbb 1_{\{n\equiv a\pmod q\}}
=\frac{1}{\varphi(q)}\sum_{\chi\in\mathcal X(q)}\overline{\chi(a)}\chi(n).
\end{align*}
Substituting this identity into $A_{q,a}$ is justified in the half-plane $\operatorname{Re}(s)>1$ by absolute convergence. Then the [Logarithmic Derivative Formula for Dirichlet $L$-Functions](/theorems/TEMP-46) gives
\begin{align*}
A_{q,a}(s)
&=\frac{1}{\varphi(q)}\sum_{\chi\in\mathcal X(q)}\overline{\chi(a)}\sum_{n=1}^{\infty}\frac{\chi(n)\Lambda(n)}{n^s}\\
&=\frac{1}{\varphi(q)}\sum_{\chi\in\mathcal X(q)}\overline{\chi(a)}\left(-\frac{L_{\chi}'(s)}{L_{\chi}(s)}\right).
\end{align*}
Now we check the [boundary regularity](/theorems/99) required by the Tauberian theorem, not only at $s=1$ but along the whole line $\operatorname{Re}(s)=1$. The [Principal Character Pole](/theorems/TEMP-39) says that $-L_{\chi_0}'/L_{\chi_0}$ has a simple pole at $s=1$ with residue $1$, and has no other singularity in neighbourhoods of points on $\operatorname{Re}(s)=1$. Since $\gcd(a,q)=1$, the principal character satisfies $\chi_0(a)=1$, so the principal term contributes exactly the pole
\begin{align*}
\frac{1}{\varphi(q)(s-1)}.
\end{align*}
For each nonprincipal character $\chi\in\mathcal X(q)$, the [Boundary Nonvanishing for Dirichlet $L$-Functions](/theorems/TEMP-47) rules out zeros of $L_{\chi}$ on the full boundary line $\operatorname{Re}(s)=1$. Hence $-L_{\chi}'/L_{\chi}$ extends holomorphically to a neighbourhood of every point of that boundary line.
Combining the principal and nonprincipal contributions, the difference
\begin{align*}
A_{q,a}(s)-\frac{1}{\varphi(q)(s-1)}
\end{align*}
extends holomorphically to a neighbourhood of every point on $\operatorname{Re}(s)=1$. Thus the [Newman Tauberian Theorem](/theorems/TEMP-31), equivalently the Wiener-Ikehara theorem for nonnegative Dirichlet coefficients in this setting, applies with residue $1/\varphi(q)$. Its conclusion is precisely
\begin{align*}
\psi_{q,a}(x)\sim \frac{x}{\varphi(q)}.
\end{align*}
[/guided]
[/step]
[step:Remove prime powers from the weighted asymptotic]
We compare $\psi_{q,a}$ with $\theta_{q,a}$. Their difference is supported on prime powers $p^k$ with $k\ge2$, so for $x\ge2$,
\begin{align*}
0\le \psi_{q,a}(x)-\theta_{q,a}(x)
&\le \sum_{\substack{p^k\le x \\ k\ge2}} \log p \\
&\le \sum_{m\le \sqrt{x}} \log m\,\bigg\lfloor \frac{\log x}{\log 2}\bigg\rfloor \\
&\le \sqrt{x}\,\log x\,\frac{\log x}{\log 2}.
\end{align*}
The final expression is $o(x)$ as $x\to\infty$. Since $\psi_{q,a}(x)\sim x/\varphi(q)$, subtracting an $o(x)$ error gives
\begin{align*}
\theta_{q,a}(x)\sim \frac{x}{\varphi(q)}.
\end{align*}
[/step]
[step:Apply partial summation to pass from $\theta_{q,a}$ to $\pi_{q,a}$]
For $x>2$, the Stieltjes partial summation formula applied to the step function $\pi_{q,a}: [2,\infty)\to\mathbb N\cup\{0\}$ gives
\begin{align*}
\theta_{q,a}(x)=\pi_{q,a}(x)\log x-\int_2^x \frac{\pi_{q,a}(t)}{t}\,d\mathcal L^1(t).
\end{align*}
Equivalently,
\begin{align*}
\pi_{q,a}(x)=\frac{\theta_{q,a}(x)}{\log x}+\int_2^x \frac{\theta_{q,a}(t)}{t(\log t)^2}\,d\mathcal L^1(t).
\end{align*}
Because $\theta_{q,a}(t)\sim t/\varphi(q)$, for every $\varepsilon>0$ there exists $T\ge2$ such that for all $t\ge T$,
\begin{align*}
\left|\theta_{q,a}(t)-\frac{t}{\varphi(q)}\right|\le \varepsilon t.
\end{align*}
Splitting the integral over $[2,T]$ and $[T,x]$, the bounded initial segment contributes $O(1)$, while the tail gives
\begin{align*}
\int_T^x \frac{\theta_{q,a}(t)}{t(\log t)^2}\,d\mathcal L^1(t)
\sim \frac{1}{\varphi(q)}\int_T^x \frac{1}{(\log t)^2}\,d\mathcal L^1(t).
\end{align*}
Also $\theta_{q,a}(x)/\log x\sim x/(\varphi(q)\log x)$.
[/step]
[step:Identify the resulting expression with the logarithmic integral]
[Integration by parts](/theorems/2098) for $\operatorname{Li}: (2,\infty)\to\mathbb R$ gives
\begin{align*}
\operatorname{Li}(x)
&=\int_2^x \frac{1}{\log t}\,d\mathcal L^1(t) \\
&=\frac{x}{\log x}-\frac{2}{\log 2}+\int_2^x \frac{1}{(\log t)^2}\,d\mathcal L^1(t).
\end{align*}
Combining this identity with the partial summation formula and the asymptotic for $\theta_{q,a}$ yields
\begin{align*}
\pi_{q,a}(x)\sim \frac{1}{\varphi(q)}\operatorname{Li}(x).
\end{align*}
This is the asserted [prime number theorem](/theorems/1742) for the arithmetic progression $a\pmod q$.
[/step]