Let $X$ and $A$ be topological spaces. Endow $X\times X$ with the product topology. Let $$f\colon X\times X\to A$$ be a (not necessarily continuous) map.
For each $x\in X$, define functions $f_{1,x},f_{2,x}\colon X\to A$ by $$f_{1,x}(y)=f(x,y),$$ $$f_{2,x}(y)=f(y,x).$$
Question: Is it true that $f$ is continuous if and only if $f_{1,x}$ and $f_{2,x}$ are continuous for all $x\in X$?
Comment: I can see one direction, namely if $f$ is continuous, then so are $f_{1,x}$ and $f_{2,x}$ for all $x$, but I'm not sure about the other direction.
No, that is not enough. The basic problem is that $f_{1, x}$ and $f_{2, x}$ tells you only "continuity in horizontal" and on vertical, and so $f$ might have a "diagonal discontinuity". This is informal, but gives the correct idea.
A counterexample is the following. Let $X=[0, 1]$, and $$ f(x, y)=\begin{cases} 0 & x=0 \text{ or }y=0, \\ \frac{xy}{(x+y)^3} & \text{otherwise} \end{cases} $$ Note that $f$ is not coninuous at $(0,0)$: $f(0,0)=0$ but $f(t,t)=1/8t$ for $t>0$, which diverges.
Now, let's showthat $f_{1,x}$ and $f_{2,x}$ are continuous. By symmetry we will only check the first one. For $x=0$, we have that $f_{1,0}=0$, so there is nothing to check. Otherwise, $$ f_{1,x}(y) = \begin{cases} 0 & y=0 \\ \frac{xy}{(x+y)^3} & y\neq 0. \end{cases} $$ This is clearly continuous for $y\neq 0$ (as $x+y\neq 0$), and for $y =0$ the limit $\lim_{y \to 0} \frac{xy}{(x+y)^3}=\frac{0}{x^3}=0$ as $x \neq 0$.
We get that $f$ is not continuous but the $f_{1,x}, f_{2,x}$ are.