Let $0<\unicode[STIX]{x1D6FC}<n,1\leq p<q<\infty$ with $1/p-1/q=\unicode[STIX]{x1D6FC}/n$, $\unicode[STIX]{x1D714}\in A_{p,q}$, $\unicode[STIX]{x1D708}\in A_{\infty }$ and let $f$ be a locally integrable function. In this paper, it is proved that $f$ is in bounded mean oscillation $\mathit{BMO}$ space if and only if $$\begin{eqnarray}\sup _{B}\frac{|B|^{\unicode[STIX]{x1D6FC}/n}}{\unicode[STIX]{x1D714}^{p}(B)^{1/p}}\bigg(\int _{B}|f(x)-f_{\unicode[STIX]{x1D708},B}|^{q}\unicode[STIX]{x1D714}(x)^{q}\,dx\bigg)^{1/q}<\infty ,\end{eqnarray}$$ where $\unicode[STIX]{x1D714}^{p}(B)=\int _{B}\unicode[STIX]{x1D714}(x)^{p}\,dx$ and $f_{\unicode[STIX]{x1D708},B}=(1/\unicode[STIX]{x1D708}(B))\int _{B}f(y)\unicode[STIX]{x1D708}(y)\,dy$. We also show that $f$ belongs to Lipschitz space $Lip_{\unicode[STIX]{x1D6FC}}$ if and only if $$\begin{eqnarray}\sup _{B}\frac{1}{\unicode[STIX]{x1D714}^{p}(B)^{1/p}}\bigg(\int _{B}|f(x)-f_{\unicode[STIX]{x1D708},B}|^{q}\unicode[STIX]{x1D714}(x)^{q}\,dx\bigg)^{1/q}<\infty .\end{eqnarray}$$ As applications, we characterize these spaces by the boundedness of commutators of some operators on weighted Lebesgue spaces.