$X,Y$ metric spaces , $X$ complete , $Z$ is Hausdorff , $f,g:X \times Y \to Z$ continuous in each variable and coincide on a dense subset , is $f=g$? Let $X,Y$ be metric spaces , $X$ be complete and $Z$ be a Hausdorff space ; let $f,g:X \times Y \to Z$ be functions such that each of $f$ and $g$ is continuous in $x \in X $ for each fixed $y \in Y$ and continuous in $y \in Y$ for each fixed $x \in X$ ; then if $f=g$ on a dense subset of $X \times Y$ , is it true that $f=g$ ? 
 A: As mentioned in the comments, by a theorem of Sierpiński the answer is yes for $Z=\mathbb{R}$, and it follows that the answer is also yes if continuous real-valued functions separate points on $Z$.
However, the answer is no for arbitrary Hausdorff spaces.  Let $X$ and $Y$ be Hausdorff spaces.  Let $P=X\times Y$ with the topology of separate continuity: that is, a subset $U\subseteq P$ is open iff for each $x\in X$ and each $y\in Y$, $U\cap(\{x\}\times Y)$ is open in $\{x\}\times Y$ and $U\cap (X\times\{y\})$ is open in $X\times\{y\}$.  (For any space $Z$, a map $P\to Z$ is continuous iff it is continuous separately in each variable.)
Suppose you have a Hausdorff space $Z$ and a pair of separately continuous maps $f,g:X\times Y\to Z$, and write $E=\{p\in X\times Y:f(p)=g(p)\}$.  Then since $f$ and $g$ are continuous as maps $P\to Z$ and $Z$ is Hausdorff, $E$ must be closed in $Z$.  Thus in order for a counterexample to your question to exist for a pair of spaces $X$ and $Y$, there must exist a proper subset $E\subset X\times Y$ which is dense with respect to the product topology but closed in $P$.  From now on, let us suppose that $E$ is such a set.  Note that there are spaces $X$ and $Y$ satisfying your hypotheses for which such an $E$ exists: for instance, if $X=Y=\mathbb{R}$, you can inductively choose a countable dense subset of $\mathbb{R}^2$ which contains at most one point on each horizontal or vertical line.
Since $X$ and $Y$ are Hausdorff, so is $P$, since its topology is finer than the product topology.  Let $f,g:P\to Z$ be the cokernel pair of the inclusion map $E\to P$.  That is, let $Z=P\times\{0,1\}/{\sim}$, where $\sim$ is the equivalence relation that identifies $(e,0)$ with $(e,1)$ for each $e\in E$, and let $f,g:P\to Z$ be given by $f(p)=[p,0]$ and $g(p)=[p,1]$ (here the brackets denote equivalence classes under $\sim$).  Then $f$ and $g$ are separately continuous maps $X\times Y\to Z$ which agree on $E$ but do not agree everywhere.  To get a counterexample to the question, it thus suffices to show that $Z$ is Hausdorff.
But it is easy to show that $Z$ is Hausdorff (as long as $X$ and $Y$ are Hausdorff) using the fact that $E$ is closed in $P$.  Given points $[p,i],[q,j]\in Z$ with $p\neq q$, we can simply let $U$ and $V$ be disjoint open sets separating $p$ and $q$ in $P$ and then the images of $U\times\{0,1\}$ and $V\times\{0,1\}$ in $Z$ will be disjoint open sets separating $[p,i]$ and $[q,j]$.  The only other case to consider is a pair of points of the form $[p,0]$ and $[p,1]$ with $p\not\in E$, and these can be separated by the images of $(P\setminus E)\times\{0\}$ and $(P\setminus E)\times \{1\}$ in $Z$.
Note that more generally, this argument shows that if $P$ is a Hausdorff space and $E\subseteq P$ is any closed subset, then there exists a Hausdorff space $Z$ and a pair of maps $f,g:P\to E$ such that $E=\{p\in P:f(p)=g(p)\}$.  In categorical language, this says that inclusions of closed subspaces are regular monomorphisms in the category of Hausdorff spaces.  In fact, with a little more work you can show that they are all of the regular monomorphisms of Hausdorff spaces.
