Here is a general strategy. You are interested in
$$\sum_{p \leq x} \frac{1}{p^{1 + \frac{2}{\log x}}} - \frac{2}{\log x} \sum_{p \leq x} \frac{\log p}{p^{1 + \frac{2}{\log x}}} + \frac{1}{(\log x)^2} \sum_{p \leq x} \frac{(\log p)^2}{p^{1 + \frac{2}{\log x}}}.$$
We use partial summation, noting that
$$\sum_{p \leq x} \frac{1}{p} = \log \log x + b + O\left(\frac{1}{\log x}\right), \qquad \sum_{p \leq x} \frac{\log p}{p} = \log x + O(1), \qquad \sum_{p \leq x} \frac{(\log p)^2}{p} = \frac{(\log x)^2}{2} + O(1).$$
Here $b$ is some explicit constant.
The first terms via partial summation are
$$e^{-2} \log \log x + b e^{-2}, \qquad -2e^{-2}, \qquad \frac{e^{-2}}{2}.$$
The error is $O(1/\log x)$ for the first two and $O(1/(\log x)^2)$ for the third.
For the second terms, we note that
$$\frac{d}{dt} \frac{1}{t^{\frac{2}{\log x}}} = -\frac{2}{\log x} \frac{1}{t} \exp\left(-\frac{2 \log t}{\log x}\right),$$
and so we must evaluate
$$\frac{2}{\log x} \int_{2}^{x} \log \log t \exp\left(-\frac{2\log t}{\log x}\right) \, \frac{dt}{t}, \qquad \frac{2b}{\log x} \int_{2}^{x} \exp\left(-\frac{2\log t}{\log x}\right) \, \frac{dt}{t}, \qquad -\frac{4}{(\log x)^2} \int_{2}^{x} \log t \exp\left(-\frac{2\log t}{\log x}\right) \, \frac{dt}{t}, \qquad \frac{1}{(\log x)^3} \int_{2}^{x} (\log t)^2 \exp\left(-\frac{2\log t}{\log x}\right) \, \frac{dt}{t}.$$
(There are also error terms; the method below shows that they are $O(\log \log x/\log x)$.) We make the change of variabes $t \mapsto e^t$, so that these become
$$\frac{2}{\log x} \int_{\log 2}^{\log x} \log t \exp\left(-\frac{2 t}{\log x}\right) \, dt, \qquad \frac{2b}{\log x} \int_{\log 2}^{\log x} \exp\left(-\frac{2 t}{\log x}\right) \, dt, \qquad -\frac{4}{(\log x)^2} \int_{\log 2}^{\log x} t \exp\left(-\frac{2 t}{\log x}\right) \, dt, \qquad \frac{1}{(\log x)^3} \int_{\log 2}^{\log x} t^2 \exp\left(-\frac{2 t}{\log x}\right) \, dt.$$
The latter three can be explicitly evaluated (directly for the second, via integration by parts for the last two); they give
$$-b e^{-2} - b \exp\left(-\frac{2 \log 2}{\log x}\right), \qquad 3e^{-2} - \exp\left(-\frac{2 \log 2}{\log x}\right) \left(\frac{2 \log 2}{\log x} + 1\right), \qquad -\frac{5}{4} e^{-2} + \frac{1}{4} \exp\left(-\frac{2 \log 2}{\log x}\right) \left(\frac{2 (\log 2)^2}{(\log x)^2} + \frac{2 \log 2}{\log x} + 1\right).$$
Note that $\exp(-2\log 2/\log x) = 1 + O(1/\log x)$. For the former, we integrate by parts once, getting
$$-e^{-2} \log \log x + \log \log 2 \exp\left(-\frac{2 \log 2}{\log x}\right) + \int_{\log 2}^{\log x} \frac{1}{t} \exp\left(-\frac{2 t}{\log x}\right) \, dt.$$
For this second term, we make the change of variables $t \mapsto \frac{\log x}{2} t$, so that this becomes
$$\int_{\frac{2 \log 2}{\log x}}^{2} \frac{e^{-t}}{t} \, dt = E_1\left(\frac{2 \log 2}{\log x}\right) - E_1(2),$$
where $E_1(z)$ is the exponential integral. Since $E_1(z) = -\log z - \gamma_0 + O(z)$ about $z = 0$, we get additional terms
$$\log \log x - \log 2 - \log \log 2 - \gamma_0 - E_1(2) + O\left(\frac{1}{\log x}\right).$$
So now we combine everything and find that the desired asymptotic is
$$\log \log x - b + \frac{e^{-2}}{4} + \frac{1}{4} - \log 2 - \gamma_0 - E_1(2) + O\left(\frac{\log \log x}{\log x}\right).$$
Alternatively, you can use your approach to get the expression
$$\frac{4}{\log x} \int_{2}^{x} \log \log t \exp\left(-\frac{2 \log t}{\log x}\right) \, \frac{dt}{t} - \frac{6}{(\log x)^2} \int_{2}^{x} \log t \log \log t \exp\left(-\frac{2 \log t}{\log x}\right) \, \frac{dt}{t} + \frac{2}{(\log x)^3} \int_{2}^{x} (\log t)^2 \log \log t \exp\left(-\frac{2 \log t}{\log x}\right) \, \frac{dt}{t}.$$
(Note that you seem to have calculated the derivative incorrectly.) We again make the change of variables $t \mapsto e^t$, yielding
$$\frac{4}{\log x} \int_{\log 2}^{\log x} \log t \exp\left(-\frac{2 t}{\log x}\right) \, dt - \frac{6}{(\log x)^2} \int_{\log 2}^{\log x} t \log t \exp\left(-\frac{2 t}{\log x}\right) \, dt + \frac{2}{(\log x)^3} \int_{\log 2}^{\log x} t^2 \log t \exp\left(-\frac{2 t}{\log x}\right) \, dt.$$
Now integrate by parts repeatedly, integrating the exponential and differentiating everything else.
Best Answer
I quote from Christian Axler, New bounds for the sum of the first $n$ prime numbers, https://arxiv.org/abs/1606.06874
Let $\pi(x)$ denote the number of primes not exceeding $x$. de la Vallée-Poussin estimated the error term in the Prime Number Theorem by showing that $$\pi(x)={\rm li}(x)+O(xe^{-a\sqrt{\log x}})\tag1$$ where $a$ is a positive absolute constant and the logarithmic integral ${\rm li}(x)$ is defined for every real $x\ge0$ as $${\rm li}(x)=\int_0^x{dt\over\log t}=\lim_{\epsilon\to0+}\left\{\int_0^{1-\epsilon}{dt\over\log t}+\int_{1+\epsilon}^x{dt\over\log t}\right\}\tag2$$ Denoting the sum of the first prime numbers not exceeding $x$ by $S(x)$, Szalay [24, Lemma 1] used (1) to find $$S(x)={\rm li}(x^2)+O(x^2e^{-a\sqrt{\log x}})\tag3$$ Using (3) and integration by parts in (2), we get the asymptotic expansion [given in the first line of the question].
[The Szalay reference is M. Szalay, On the maximal order in $S_n$ and $S_n^*$, Acta Arith. 37 (1980) 321–331.]
Then Axler proves various results like
For every $x \ge 110 118 925$, we have $$S(x)<\frac{x^2}{2\log x}+\frac{x^2}{2\log^2 x}+\frac{x^2}{4\log^3 x}+\frac{5.3x^2}{8\log^4 x} $$ and
For every $x \ge 905 238 547$, we have$$S(x)>\frac{x^2}{2\log x}+\frac{x^2}{2\log^2 x}+\frac{x^2}{4\log^3 x}+\frac{1.2x^2}{8\log^4 x} $$