We know that $ \int_X |f|^r = \int_0^\infty ry^{r-1}\mu\left\{|f|>y\right\} dy $. If $ \mu(X) = \infty $, the statement is trivial, so assume it's finite.
We have
$ \int_0^\infty ry^{r-1}\mu(|f|>y) dy = \int_0^{\mu(X)^{\frac{-1}{p}}} ry^{r-1}\mu\left\{|f|>y\right\} dy +\int_{\mu(X)^{\frac{-1}{p}}}^\infty ry^{r-1}\mu\left\{|f|>y\right\} dy $
Now $ \mu(|f|>y)\leq\mu(X) \Rightarrow \int_0^{\mu(X)^{\frac{-1}{p}}} ry^{r-1}\mu(|f|>y) dy \leq \mu(X)\int_0^{\mu(X)^{\frac{-1}{p}}} ry^{r-1} dy = \mu(X)^{1-\frac{r}{p}} $,
and by hypothesis, $ \mu(|f|>y) \leq c_0y^{-p} \Rightarrow \int_{\mu(X)^{\frac{-1}{p}}}^\infty ry^{r-1}\mu\left\{|f|>y\right\} dy \leq \int_{\mu(X)^{\frac{-1}{p}}}^\infty rc_0y^{-1-p+r} dy = \frac{rc_0}{p-r}\mu(X)^{1-\frac{r}{p}} $
Letting $ c = 1 + \frac{rc_0}{p-r} $ finishes the proof.
-pw