Let $\Omega\subset\mathbb{R}^n$ be open. Let $f:\Omega\rightarrow\mathbb{R}$ be a measurable function and $g\in L^p(\Omega)$, for some $p\geq 1$.
For a measurable function $f: \Omega\rightarrow\mathbb{R}$, we call $\lambda_f:[0, \infty)\rightarrow[0, \infty]$, defined as \begin{equation} \lambda_f(t)\equiv|\{|f|>t\}|, \end{equation} the distribution function of $f$.
I would like to show that if $\lambda_f(t)\leq\lambda_g(t)$ for all $t>0$ then $f\in L^p(\Omega)$.
Below is my proof for the case that $|\Omega|<\infty$. I don't know if the result holds for $|\Omega|=\infty$, that is, I have not been able to find a proof for the case that $|\Omega|=\infty$, nor have been able to come up with a counterexample to show otherwise. I would like to know if the result holds true for $|\Omega|=\infty$ and if my proof is correct.
Proof
Let us suppose to the contrary, that is, \begin{equation*} \int_{\Omega}|f|^p\ \mathrm{d}x=\infty. \end{equation*} This implies that $|f|>|g|$ a.e. in $\Omega$, which in turn implies \begin{equation} \lambda_f(t)=\lambda_g(t)\quad\forall t>0. \end{equation}For a fixed $t>0$ we define \begin{align*} X_t &\equiv\{|f|>|g|>t\},\\ Y_t &\equiv\{|f|>t\geq |g|\}\text{ and }\\ Z_t &\equiv\{t\geq |f|>|g|\}. \end{align*}Note that \begin{equation*} \Omega=X_t\cup Y_t\cup Z_t\cup \{|f|\leq|g|\}\quad\text{and}\quad X_t\cap Y_t\cap Z_t\cap \{|f|\leq|g|\}=\emptyset. \end{equation*}Since $|\{|f|\leq |g|\}|=0$ we only need to consider integrating $|f|^p$ over $X_t\cup Y_t\cup Z_t$.
For $Z_t$ we have \begin{equation*} \int_{Z_t}|f|^p\ \mathrm{d}x\leq t^p|\Omega|<\infty. \end{equation*} If $|X_t|>0$ for all $t>0$ then $|g|>t$ a.e. for all $t>0$ and hence $|g|=\infty$ a.e. in $\Omega$. However, this contradicts the fact that $|g|^p\in L^1(\Omega)$. Consequently, there exists some $t^{\ast}>0$ such that $|X_{t^{\ast}}|=0$. If $|X_{t^{\ast}}|=0$ and $|Y_{t^{\ast}}|>0$ then \begin{equation}\tag{1} 0<\lambda_f(t^{\ast})=|Y_{t^{\ast}}|. \end{equation}Since $X_{t^{\ast}}\supseteq \{|g|>t^{\ast}\}$ and $|X_{t^{\ast}}|=0$ we have \begin{equation}\tag{2} \lambda_{g}(t^{\ast})=0. \end{equation}Now because $\lambda_f(t^{\ast})=\lambda_g(t^{\ast})$, we have via $(1)$ and $(2)$: \begin{equation*} 0<\lambda_f(t^{\ast})=0. \end{equation*} This is a contradiction whence $|Y_{t^{\ast}}|=0$. Therefore, \begin{equation*} \int_{\Omega}|f|^p\ \mathrm{d}x=\int_{X_{t^{\ast}}}|f|^p\ \mathrm{d}x+\int_{Y_{t^{\ast}}}|f|^p\ \mathrm{d}x+\int_{Z_{t^{\ast}}}|f|^p\ \mathrm{d}x=\int_{Z_{t^{\ast}}}|f|^p\ \mathrm{d}x<\infty, \end{equation*}that is, $f\in L^p(\Omega)$.
Since $g\in L^p(\Omega)$, an application of Fubini's theorem gives us \begin{equation} \int_{\Omega}|g|^p\ \mathrm{d}x=\int_0^{\infty} ps^{p-1}\lambda_g(s)\ \mathrm{d}s. \end{equation} Consequently,
\begin{equation} \int_{\Omega} |f|^p\ \mathrm{d}x=\int_0^{\infty} ps^{p-1}\lambda_f(s)\ \mathrm{d}s\leq \int_0^{\infty} ps^{p-1}\lambda_g(s)\ \mathrm{d}s=\int_{\Omega}|g|^p\ \mathrm{d}x<\infty. \end{equation} Therefore, $f\in L^p(\Omega)$.