Fix some probability space $(\mathrm{\Omega},\mathcal{F},\mathbb{P})$, and let $\mathcal{A}\subset \mathcal{F}$ be a sub-$\sigma $-algebra. Suppose that $g,h:\mathrm{\Omega}\to \mathbb{R}$ are two $\mathbb{P}$-integrable and $\mathcal{A}$-measurable functions.

I need help understanding why $\{h>g\}\in \mathcal{A}$? I understand that since $g$ and $h$ both are $\mathcal{A}$-measurable, it holds that for all $B\in \mathcal{B}(\mathbb{R})$:

${h}^{-1}(B)\in \mathcal{A},\phantom{\rule{1em}{0ex}}{g}^{-1}(B)\in \mathcal{A}.$

However, I can't seem to make the connection as to why $\{h>g\}\in \mathcal{A}$ also holds true.

I need help understanding why $\{h>g\}\in \mathcal{A}$? I understand that since $g$ and $h$ both are $\mathcal{A}$-measurable, it holds that for all $B\in \mathcal{B}(\mathbb{R})$:

${h}^{-1}(B)\in \mathcal{A},\phantom{\rule{1em}{0ex}}{g}^{-1}(B)\in \mathcal{A}.$

However, I can't seem to make the connection as to why $\{h>g\}\in \mathcal{A}$ also holds true.