I was reading this post from 2011 on here regarding the equality case for the Holder inequality, i.e. $$\int |fg| =\|f\|_p\|g\|_q$$ First, the author of the post handled the cases where one of $\|f\|_p,\|g\|_q$ are either $0$ or $\infty$. From there, the author said
When we are proving the Hölder's inequality, we use that for $a,b\geq 0$ $$ab\leq \frac{a^p}{p}+\frac{b^q}{q}, \tag{1}$$ where the equality holds if and only if $b=a^{p/q}$. Explicitly $$\int\vert fg \vert\leq \Vert f \Vert_p \Vert g \Vert_q \int\left( \frac{\vert f \vert^p}{p\Vert f \Vert_p^p} + \frac{\vert g \vert^q}{q\Vert g \Vert_q^q}\right)=\Vert f \Vert_p \Vert g \Vert_q. \tag{2}$$
I was looking for some justification of the $\leq$ relationship in $(2)$. It's not clear to me how the author obtained this. Clearly, from $(1)$, it's not hard to see that the author was insisting that
$$\int|fg|\leq \int \frac{|f|^p}{p} + \frac{|g|^q}{q} \tag{3}$$
But from here, I get lost. I'm trying to reverse engineer $(2)$. So, $(2)$ can also be written as
$$\left( \frac{\|f\|_p^{p-1} \|g\|_q}{p}\right) \|f\|_p^p + \left( \frac{\|f\|_p\|g\|_q^{q-1}}{q} \right)\|g\|_q^q \tag{4}$$
But I suspect this manipulation is only making matters worse. How is (2) justified?