I am reading section 9.3 of GTM206, which is about the derivation and application of Selberg's sieve, and I was stuck at proving
$$ \sum_{n\le x}\left(\sum_{d|(n,P_z)}\lambda_d\right)^2\le\sum_{d_1,d_2\le z}{\lambda_{d_1}\lambda_{d_2}\over[d_1,d_2]}+\mathcal O(z^2) $$
where $(a,b)=\gcd(a,b)$; $[a,b]=\operatorname{lcm}(a,b)$; $P_z$ is the product of primes $\le z$; $\lambda_d$ is a sequence of real numbers satsifying $\lambda_1=1$, $|\lambda_d|\le1$, and $\lambda_d=0$ for all $d>z$; and the implied constant in the big O term is absolute.
What I have attempted: via interchanging the sums, I am able to manipulate the LHS into
$$ \sum_{n\le x}\left(\sum_{d|(n,P_z)}\lambda_d\right)^2=\sum_{d_1|P_z}\sum_{d_2|P_z}{\lambda_{d_1}\lambda_{d_2}\over[d_1,d_2]}x+\mathcal O(z^2) $$
I wonder how I could show that this sum is dominated by the sum over $d_1,d_2\le z$.