I got this lemma and proof from a book however I cannot understand the proof.

How can $\alpha\beta\leq\frac{\alpha^p}{p}+\frac{\beta^q}{q}$? What do we take from the last inequality? Sorry for print screening. Thanks for reading
The function $x\mapsto e^x$ is convex so $$ab = \exp(\log a+ \log b)=\exp\left(\frac{1}{p}\log a^p+\frac{1}{q}\log b^q\right)$$ $$\leq\frac{1}{p}e^{\log(a^p)}+\frac{1}{q}e^{\log(b^q)}=\frac{a^p}{p}+\frac{b^q}{q}.$$