@DanielFischer Is it better like that?
Suppose $x_1, x_2 \in X, y_1, y_2 \in Y$ such that $h(\langle x_1, y_1 \rangle) =h(\langle x_2, y_2 \rangle) \Rightarrow \langle f(x_1), g(y_1) \rangle =\langle f(x_2), g(y_2) \rangle \Rightarrow f(x_1)=f(x_2) \wedge g(y_1)=g(y_2) \overset{\text{injectivity of f,g}}{\Rightarrow} x_1=x_2 \wedge y_1=y_2 \Rightarrow \langle x_1,y_1 \rangle=\langle x_2, y_2 \rangle.$
And can we show like that that the function $h$ is well-defined?
$\langle f(x_1), g(y_1) \rangle \neq \langle f(x_2), g(y_2)\rangle \rightarrow f(x_1) \neq f(x_2) \lor g(y_1) \neq g(y_2) …