It's well know that $a \frac{x}{\log x}\le \pi(x) \le b \frac{x}{\log x}$ for some constant $a,b \in \mathbb{R}$.
There are a lot of ideas to prove it, but I've saw an exercise with following statement :
Prove that if $\sum_{p \le x} \frac{\log p}{p} - \log x = \lambda + o(1)$ , then asymptotic law holds.
I don't know where is the connection between them?
If we know that $$ \sum_{p\leq x}\frac{\log p}{p} = \log(x)-\lambda+o(1) $$ holds, we also know that $$ \sum_{x/2<p\leq x}\frac{\log p}{p} = \log(2)+o(1) $$ holds. All the terms of the above sum are bounded between $\frac{\log(x/2)}{x/2}$ and $\frac{\log(x)}{x}$, so $$ \log(2)+o(1) \geq \left[\pi(x)-\pi(x/2)\right]\frac{\log x}{x}, $$ $$ \log(2)+o(1) \leq \left[\pi(x)-\pi(x/2)\right]\frac{\log(x)}{x/2} $$ or $$ (\log(2)+o(1))\frac{x}{2\log(x)}\leq\pi(x)-\pi(x/2) \leq (\log(2)+o(1))\frac{x}{\log x}.$$ By replacing $x$ with $x/2,x/4,x/8,\ldots$ and summing all these inequality we get $$ A\frac{x}{\log x}\leq \pi(x) \leq B\frac{x}{\log x} $$ as wanted, with $A\approx \log(2)$ and $B\approx 2\log(2)$.