Assume that a binary function $f \colon \mathbb{R}^2 \rightarrow \mathbb{R}$.
For every $x_{0}, y_{0} \in \mathbb{R}$, let $$g_{y_{0}} \colon \mathbb{R} \rightarrow \mathbb{R} \\ ~~~~~~~~~~~~~~~~~x \mapsto f(x,y_{0}) \\$$ $$h_{x_{0}} \colon \mathbb{R} \rightarrow \mathbb{R} \\ ~~~~~~~~~~~~~~~~~x \mapsto f(x_{0},y) \\$$ Prove that $f$ is continuous if
(1)For every $x \in \mathbb{R}$, $g_{x}$ is continuous.
(2)For every $y \in \mathbb{R}$, $h_{y}$ is continuous.
(3)For every compact subset of $G \subset \mathbb{R}^2$, $f(G)$ is also a compact subset of $\mathbb{R}$.
Obviously, (1) and (2) don't imply that $f$ is continuous. But I don't know how to use (3). Indeed, I don't understand the useness of (3). If $f$ satisfies (1) and (2), I don't know how to add a condition to make $f$ be continuous.
You want to get this equivalence:
$\lim_{(x,y)\to (x_0,y_0)}f(x,y)=\lim_{y\to y_0} \lim_{x\to x_0} f(x,y)$
Because if $f$ verifies the property $(1) $ and $(2)$ than
$\lim_{(x,y)\to (x_0,y_0)}f(x,y) =\lim_{y\to y_0} \lim_{x\to x_0} f(x,y) =$
$\lim_{y\to y_0} f(x_0,y)=f(x_0,y_0)$
and so $f$ is continuos in $(x_0,y_0)$.
Now we want formulate the condition in a formal way to understand when it is verified.
Let $f: \mathbb{R}^2\to \mathbb{R}$ and $(x_0,y_0)$ such that there exist $l(y):=\lim_{x\to x_0}f(x,y)$ for any $y\in \mathbb{R}$ and exists $l=\lim_{y\to y_0}l(y)$
First of all for every $\epsilon >0$ there exists $\delta_1=\delta_1(\epsilon)>0$ such that for every $y$ for which $|y-y_0|<\delta_1$ than $|l-l(y)|<\epsilon$
When there is the equivalence
$\lim_{(x,y)\to (x_0,y_0)}f(x,y) =\lim_{y\to y_0} l(y)$ ?
If you have the uniform limit property
For every $\epsilon >0$ there exists $\delta=\delta_2(\epsilon)>0$ such that for every $x$ for which $|x-x_0|<\delta_2$ than $ \sup_{y\in B(y_0,\delta_1)}|l(y)-f(x,y)|<\epsilon$
because you have that there exists $\delta:=min\{\delta_1 , \delta_2\}$ and for every $(x,y)$ for which $|| (x,y)-(x_0,y_0)||<\delta$ than $ |x-x_0|<\delta_2$ and $|y-y_0|<\delta_1$ and so
$|l-f(x,y)|<|l-l(y)|+|l(y)-f(x,y)|<\epsilon+\epsilon=2\epsilon$
Now you can prove that the condition $(3)$ implies the uniform limit property.