= Solution
Put $E_q=\max_{(a,q)=1}|\pi(x;q,a)-\operatorname{Li}(x)/\phi(q)|$, with $\operatorname{Li}$ the offset <logarithmic integral function>. The permitted standard sieve estimate can be taken as the <Brun–Titchmarsh theorem>:
$$
\pi(x;q,a)\leq\frac{2x}{\phi(q)\log(x/q)},\qquad q<x,quad(a,q)=1.
$$
For $q\leq x^{0.99}$, $\log(x/q)\geq0.01\log x$. Also $\operatorname{Li}(x)\ll x/\log x$. Thus both terms defining $E_q$ are $O(x/(\phi(q)\log x))$, uniformly over the permitted moduli. Apply the <Cauchy-Schwarz inequality> in the form
$$
\sum_{q\leq Q}3^{\omega(q)}E_q
\leq\left(\sum_{q\leq Q}E_q\right)^{1/2}\left(\sum_{q\leq Q}9^{\omega(q)}E_q\right)^{1/2}
\ll\left(\sum_{q\leq Q}E_q\right)^{1/2}\left(\frac{x}{\log x}\sum_{q\leq Q}\frac{9^{\omega(q)}}{\phi(q)}\right)^{1/2}.
$$
This is the <weighted arithmetic-progression error bound>. The <prime omega function> and <Euler totient function> weights can therefore be handled using an unweighted mean error and a separate positive <sum>.
Back to article page