Let $(\Omega,\mathscr{F},P)$ be a measure space and $T$ be a metric space and $f,g:\Omega\rightarrow T$ be measurable functions.
Then, is the set $\{w\in \Omega:f(w)\neq g(w)\}$ measurable?
I could prove this for the case $T$ is a separable topological vector space, but I am not sure for the case when $T$ is a metric space.
EDIT
Let $d$ be a metric on $X$. Since $d$ is continuous, $d$ is ($\mathscr{B}_{X\times X}, \mathscr{B}_\mathbb{R}$)-measurable. Since $f,g$ are measurable, the map $F(w):=(f(w),g(w))$ is measurable with respect to $(\mathscr{F},\mathscr{B}_X\otimes \mathscr{B}_X)$.
My point is that $d\circ F$ need not be measurable. To see this, pick $A\in \mathscr{B}_\mathbb{R}$. Then, $d^{-1}(A)\in \mathscr{B}_{X\times X}$.
If $d^{-1}(A)\in \mathscr{B}_X \otimes \mathscr{B}_X$, then $F^{-1}(d^{-1}(A))\in \mathscr{F}$ so we are done.
However, $d^{-1}(A)$ need not be in $\mathscr{B}_X \otimes \mathscr{B}_X$ without the separability condition, because $\mathscr{B}_X \otimes \mathscr{B}_X \neq \mathscr{B}_{X\times X}$ in general.