Proposition: Let $(X,\mathcal{A})$ be a measurable space, let $Y$ be a separable metrizable space, and let $f,g: X \to Y$ be measurable with respect to $\mathcal{A}-\mathcal{B}(Y)$ , where $\mathcal{B}(Y)$ denotes the Borel-$\sigma$-Algebra. Show that $D:=\{x \in X \mid f(x)=g(x) \} \in \mathcal{A}$.
my Proof: Define the function $F:X \to Y \times Y$ with $F(x): = (f(x),g(x))$ and consider the set $G: = \{(y_1,y_2) \in Y \times Y \mid y_1=y_2 \}$. Then $G$ is closed in $Y$, since the limit of every convergent sequence is still in $G$. Hence $G$ is a Borel set. Since the function $F$ is measurable with respect to $\mathcal{A}$ and $\mathcal{B}(Y \times Y)$ (this follows from the measureability of $f$ and $g$) $F^{-1}(G)=D$ is measurable in $\mathcal{A}$.