Show that:
$$ \sum_{p \leq x} \log p \big( \log x - \log p\big) = O(x) $$
This is not an exercise. This is implied in one line of proof by Atle Selberg. Additionally the paper asks to show:
$$ \sum_{p^a \leq x, \; a > 1} \log^2 x = O(x)$$
Since the summand does not depend on $p$, I think this just ammounts to counting prime numbers smaller than $\sqrt{x}, \sqrt[3]{x}$, etc. Lastly $$ \sum_{p^a q^b \leq x , \; a > 1} \log p \log q = O(x)$$
and this depends on $p$ and $q$. These supposedly can be derived from two formulas. First sum of log of primes $$ \sum_{p \leq x} \log p = O(x) $$
and secondly some some of fractions. I don't know if there is a typo in the paper. I think it should be the second one, which is Mertens' theorem
$$ \sum_{p \leq x} \frac{\log p}{x} = \log x + O(1) \hspace{0.25in}\text{ or }\hspace{0.25in} \sum_{p \leq x} \frac{\log p}{p} = \log x + O(1)$$
There is an elementary proof :
Let $b(n) = \begin{cases}\log n \text{ if } n \text{ is prime}\\0 \text{ otherwise}\end{cases} \quad$ and $\quad$ $\theta(N) =\sum_{n=1}^N b(n)= \sum_{p \le N} \log p$.
Using the summation by parts $$\sum_{n=1}^N b(n) \log n= \theta(N)\log N -\sum_{n=1}^{N-1}\theta(n) (\log n - \log(n+1))$$ $|\log n - \log(n+1)| = |\log (1-\frac{1}{n+1})|< \frac{1}{n}$ so that $$\left|\sum_{n=1}^{N-1}\theta(n) (\log n - \log(n+1))\right| < \sum_{n=1}^{N-1}\frac{\theta(n) }{n} = \mathcal{O}(N)$$ and hence
$$\sum_{p \le N} \log p (\log N - \log p) = \log N \ \theta(N) - \sum_{n=1}^N b(n) \log n$$ $$ = \log N\ \theta(N)-\log N \ \theta(N)+\mathcal{O}(N) = \mathcal{O}(N)$$