The case $ \mu(X)=\infty $ the inequality is true.
Suppose $ \mu(X) $ is finite, we have
Given $ p^{'}=\frac{p+r}{2} $,
$ \int_{X}|f|^{r}d\mu \leq \int_{X}|f|^{p^{'}}(\mu(X))^{1-r/p^{'}} \leq \int_{X}|f|^{p^{'}}(\mu(X))^{1-r/p} $ by Holder.
Now, let $ h=|f|^{p{'}} $, then $ w(y)=\mu(\{g>y\} \leq \frac{c_{0}}{y^{p/p{'}}} $
$ \int_{X}hd\mu = \int_{0}^{\infty} $