I would like to show that $$ \sum_{p\leq x} \frac{1}{p^{1+2/\log x}}\left(\frac{\log\left(x/p\right)}{\log(x)}\right)^2=\log\log x +\mathcal{O}(1) $$

**What I have tried**

Since we know that $$ \sum_{p\leq x}\frac{1}{p}=\log\log x+\mathcal{O}(1) $$ (see this post) I thought I could use Abel's summation to prove the above estimate. Abel's summation says that given a sequence of real numbers $(a_n)_{n=0}^{\infty}$, we can define the partial sum $$ A(t)=\sum_{n\leq t}a_n $$ and, if $\phi$ is a continously differentiable function on $[1,x]$, we have $$ \sum_{1\leq n\leq x}a_n\phi(n)=A(x)\phi(x)-\int_1^x A(u)\phi^{\prime}(u)\,du $$ In our case I would take $$ a_n = \begin{cases} 1/p &\text{if } n=p \text{ is prime}, \\ 0 &\text{otherwise}, \end{cases} $$ and $$ \phi(t)=\frac{1}{t^{2/\log x}}\left(\frac{\log \left(x/t\right)}{\log x}\right)^2 $$ but in this way I have $$ \phi(x)=0 $$ and therefore I am only left with the integral from Abel's summation formula which looks pretty ugly to me $$ \sum_{p\leq x} \frac{1}{p^{1+2/\log x}}\left(\frac{\log\left(x/p\right)}{\log(x)}\right)^2=\int_1^x \left(\sum_{p\leq u}\frac{1}{p}\right)\frac{2\log\left(x/u\right)\left(\log(x/u)+\log x\right)}{u^{2/\log x+1}(\log x)^3}\,du $$ On the other hand, since $$ \left(\frac{\log\left(x/p\right)}{\log(x)}\right)^2\leq 1 $$ and $$ \frac{1}{p^{2/\log x}}\leq 1 $$ I clearly have that $$ \sum_{p\leq x} \frac{1}{p^{1+2/\log x}}\left(\frac{\log\left(x/p\right)}{\log(x)}\right)^2\leq \sum_{p\leq x}\frac{1}{p}=\log\log x+\mathcal{O}(1) $$ hence I only need to prove that I similar lower bound holds too.

Is there any another way I could proceed? Do you have any hint?

I am not sure this question is appropriate for MathOverflow but I tried asking the same question on MathStackexchange (here) and didn't receive any reply.

Thank you for your help!