Continuity of function from product space topology

Let $X, Y, Z$ be topological spaces and $X\times Y$ be a product space Show that if a map $f:X\times Y\to Z$ is continuous, then the functions $$f(x): Y \to Z; \\ f(x)(y)=f(x,y); \\ f(y): X \to Z; \\ f(y)(x)=f(x,y);$$ are continuous, for any $x\in X$ and $y\in Y$.

Thoughts: I've tried using the fact that the projections $p_1: X \times Y \to X$ and $p_2: X \times Y \to Y$ are continuous, but I did not get far. How should I proceed?

Also need an example to show the reciprocal affirmation isn't right.

Fix $x$. Then the "inclusion" $g_x \colon Y \to X \times Y, y \mapsto (x,y)$ is continuous. Indeed, an open set in $X \times Y$ is of the form $\bigcup_i (U_i \times V_i)$ and $g_x^{-1}(\bigcup_i (U_i \times V_i)) = \bigcup_j V_j$ is open, where $J := \{i \in I \mid x \in U_i\}$.

Let $W$ be an open subset of $Z$. Then $f(x)^{-1}(W)=g_x^{-1}(f^{-1}(W))$ is open because $g_x$ and $f$ are continuous.

We usually speak of joint VS separate continuity. It is a topic that still has some active research. But there are not so difficult examples of separately continuous functions that are not jointly continuous. A classical is the following (see also this answer):

$$f \colon \mathbb{R}^2 \to \mathbb{R}, \quad f(x,y) = \begin{cases}\qquad 0 &, x = y = 0\\ \dfrac{xy}{x^2+y^2} &, x^2+y^2 > 0\end{cases}$$

You can easily see that $f(x=0)$ and $f(y=0)$ are continuous because they are constantly $0$. And for values other than $0$, everything is fine. But $f$ is not jointly continuous. Indeed, when $r:=x^2+y^2>0$, you can write $x=r \cos(\phi)$, $y=r \sin(\phi)$ and $f(x,y) = \cos(\phi)\sin(\phi)$. In particular, $f$ is constant along rays starting from $0$, so that there is no "total" limit of $f$ for $(x,y) \to 0$.

Let $x_0\in X$ and prescribe the functions $u:Y\to X$ and $v:Y\to Y$ by $y\mapsto x_0$ and $y\mapsto y$ respectively.

Then $u$ is constant hence continuous and $v$ is identity hence continuous.

Then a unique continuous function $w:Y\to X\times Y$ exists with $p_1\circ w=u$ and $p_2\circ w=v$ where $p_1:X\times Y\to X$ and $p_2:X\times Y\to Y$ denote the projections and are prescribed by $\langle x,y\rangle\mapsto x$ and $\langle x,y\rangle\mapsto y$ respectively.

This means that $w$ is prescribed by $y\mapsto\langle x_0,y\rangle$.

Then function $f\circ w:Y\to Z$ is continuous as composition of continuous functions and it is prescribed by $y\mapsto f(x_0,y)$.

This can be done for any fixed $x_0\in X$ and likewise it can be shown that for any fixed $y_0\in Y$ the function $X\to Z$ prescribed by $x\mapsto f(x,y_0)$ is continuous.