In the following I denote by $B(x,r)$ the ball centered at $x$ of radius $r$, and by $|B(x,r)|$ the measure of this ball. I am trying to solve the following exercise.
Question
Let $f \geq 0, R \geq 0$ and $B_R$ a ball of radius $R$ in $\mathbb R^d$. Show that for every $0 < r< R$ we have $$ \int_{B_R} f \leq C \int_{B_R} \left( \frac{1}{|B(x,r)|} \int_{B(x,r)} f \right) d x, $$ where $C$ is a constant only depending on $d$.
Attempt
When $f$ is bounded, using the Lebesgue differentiation theorem I can show that there exists $R'$ such that for all $r \in (0, R')$ it holds $$ \int_{B_R} f \leq 2 \int_{B_R} \left( \frac{1}{|B(x,r)|} \int_{B(x,r)} f \right) d x. $$ So it remains to prove the inequality when $r \in (R', R)$ and also generalize it for unbounded functions $f$. I am not sure how to proceed from this