Consider the following question:
In the first image, I have no question but it has been given for reference purposes because the same method is directly used in image 2.
In this image, I am unable to understand: Consider line 2 of proof. I don't understand how term $k^l$ comes and why he multiplied $(1-1/p)$. $ O(1/p^2) $ is clear to me.
Edit : I am sorry to say but I am also unable to prove /deduce 3rd line from 2nd line i.e. I am not clear how $x \times \exp( (k^l -1) \sum_{ p\leq x} (1/p +O(1/p^2))) $.
Can you please help with that?


I assume you are looking at this reference here: http://www.math.tau.ac.il/~rudnick/courses/sieves2015/multiplicative3.pdf
The factor of $(1-\frac{1}{p})$ comes from Proposition 1.3 which your question conveniently omitted. If you look at the proof of that proposition, it is observed that $g(p^k)=f(p^k)-f(p^{k-1})\geq 0$. So that is where the fact of $(1-\frac{1}{p})$ is coming from.
The factor of $k^\ell$ arises from definition. First, $$ \tau_{k}\left(p^{j}\right)=\frac{(k+j-1) !}{j !(k-1) !} $$ and for $j=1$, $\tau_{k}\left(p\right)=\frac{k!}{(k-1) !}=k$. Now, there is a typo as the $M_{\tau_{k}^{j}}(x)$ should really be a $M_{\tau_{k}^{\ell}}(x)$. Therefore, $\tau_k^\ell(p)=k^\ell$.
Edit: It is a known result that $$ \sum_{p\leq x} \frac{1}{p} \ll \log(\log x) $$ On the other hand, $\sum_{p\leq x}O(1/p^2)=O(1)$. So, $$ x \exp \left(\left(k^{\ell}-1\right) \sum_{p \leq x}\left(\frac{1}{p}+O\left(\frac{1}{p^{2}}\right)\right)\right)\ll x\exp\left((k^\ell-1)\log(\log x)\right)=x(\log x)^{k^\ell-1}. $$