Prove that $\sum\limits_{p\le x\\ p\text{ prime}} \log p= x+O\left(\frac{x}{\log^2 x}\right)$ using Prime Number Theorem
Solution 1:
It is impossible to use OP's version of PNT to prove the desired result.
In fact, the remainder term looks like this:
$$ E(x)=\pi(x)-{x\over\log x}\asymp{x\over\log^2x} $$
By partial summation, we have
$$ \vartheta(x)=\sum_{p\le x}\log p=\pi(x)\log x-\int_2^x{\pi(t)\over t}\mathrm dt $$
However, because
$$ \int_2^x{\pi(t)\over t}\mathrm dt\gg\int_2^x{\mathrm dt\over\log t}\gg{x\over\log x} $$
Therefore even with the best possible $E(x)$, OP's method can only deduce
$$ \vartheta(x)=x+\mathcal O\left(x\over\log x\right) $$
On the other hand, if you use a more superior version of prime number theorem:
$$ \pi(x)=\int_2^x{\mathrm dt\over\log t}+\mathcal O\left(xe^{-c\sqrt{\log x}}\right) $$
where $c$ is an effectively computable positive constant (this is due to de la Vallée Poussin in 1898), then it is possible to improve the remainder term of $\vartheta(x)$ considerably:
\begin{aligned} \vartheta(x) &=\int_{2^-}^x\log t\mathrm d\pi(t)=\int_{2^-}^x\mathrm dt+\int_2^x\log t\mathrm d\left\{\mathcal O\left(te^{-c\sqrt{\log t}}\right)\right\} \\ &=x+\mathcal O\left\{x(\log x)e^{-c\sqrt{\log x}}\right\}+\mathcal O\left\{\int_2^xe^{-c\sqrt{\log t}}\mathrm dt\right\} \end{aligned}
To estimate the remaining integral, we can introduce a square root factor:
$$ \int_2^xe^{-c\sqrt{\log t}}\mathrm dt\le x^{1/2}e^{-c\sqrt{\log x}}\int_2^xt^{-1/2}\mathrm dt\ll xe^{-c\sqrt{\log x}} $$
Now, we can pick any $c'\in(0,c)$ to obtain the following asymptotic formula:
$$ \vartheta(x)=x+\mathcal O\left(xe^{-c'\sqrt{\log x}}\right) $$
This error term is a much sharper result than the $\mathcal O(x\log^{-2}x)$ stated by the OP.