Prove that the map $b \mapsto \max_{a \in A} g (a, b)$ is continuous I'm proving below theorem for the course in game theory. Could you please verify if my proof looks fine or contains logical gaps/errors? Thank you so much for your help!

$\textbf{Theorem} \quad$Assume $A,B$ are nonempty compact and $g:A \times B \to \mathbb R$ is continuous. Then for each $b\in B$, the map $$f: B \to \mathbb R, \quad b \mapsto \max_{a \in A} g (a, b)$$ is continuous.

We need the following lemma:

$\textbf{Lemma} \quad$Let $C$ be nonempty compact and $f,g: C \to \mathbb R$ be continuous. Then $$\left |\max_{x \in C} f(x) - \max_{x \in C} g(x) \right| \le \max_{x \in C} |f(x) -g(x) |$$

My attempt:
Fix $\epsilon>0$ and  $b \in B$. By the continuity of $g$, we have $\forall a \in A, \exists \delta_a>0$ such that $$\max \{\| d - a \|, \| c - b \| \}< \delta_a  \implies |g (d, c) -g (a, b)| < \epsilon/2$$ Because $\{ \mathbb B(a, \delta_a) \mid  a \in A\}$ is an open cover of the compact set $A$, there is a finite subcover $\{ \mathbb B(a_k, \delta_k) \mid  k=1,\ldots,n\}$. Let $\delta = \min \{\delta_k \mid k=1,\ldots,n\}$.
For each $a \in A$, there is $k \in \{1,\ldots,n\}$ such that $a \in \mathbb B(a_k, \delta_k)$. Consider $c \in \mathbb B(b,\delta)$, we have $|g (a, c) -g (a, b)| = |(g (a, c) - g(a_k, b)) + (g(a_k, b)-  g (a, b))|  \le |g (a, c) - g(a_k, b)| +$ $|g(a_k, b)-  g (a, b)|$. Moreover, $\delta \le \delta_k$ by definition of $\delta$. So $|g (a, c) - g(a_k, b)| < \epsilon/2$ and $|g(a_k, b)-  g (a, b)| < \epsilon/2$. Hence $\forall (a,c) \in A \times \mathbb B(b,\delta): |g (a, c) -g (a, b)| < \epsilon$ and thus $\forall c \in \mathbb B(b,\delta): \max_{a \in A} |g (a, c) -g (a, b)| < \epsilon$.
By our lemma, $|\max_{a \in A} g (a, c) - \max_{a \in A} g (a, b)| \le \max_{a \in A} |g (a, c) -g (a, b)| < \epsilon$. Hence $\|c-b\| < \delta \implies |f(c)-f(b)| <\epsilon$. Thus $f$ is continuous. $\blacksquare$
 A: Maybe you can streamline the proof: fix $b'\in B$. For each $a\in A$, there is a $\delta_a>0$ such that $|g(a,b)-g(a,b')|<\epsilon$ whenever $|b-b'|<\delta_a$. Compactness of $A$ gives us a $\delta>0$ such that $|g(a,b)-g(a,b')|<\epsilon$ whenever $|b-b'|<\delta$. This implies that $\max_{a\in A}|g(a,b)-g(a,b')|\le \epsilon$ if $|b-b'|<\delta.$ The result now follows from the lemma. 
A: I've just figured out that we can obtain a stronger result. So I post my attempt here. It would be great if someone helps me verify it. Thank you so much!

First, we need a lemma:

$\textbf{Lemma} \quad$ Let $C$ be nonempty compact and $f,g: C \to \mathbb R$ be continuous. Then $$\left |\max_{x \in C} f(x) - \max_{x \in C} g(x) \right| \le \max_{x \in C} |f(x) -g(x) |$$

We endow $A \times B$ with norm $\| \cdot\|$ where $\|(a,b)\| =\|a\| + \|b\|$. Because $g$ is continuous and $A \times B$ is compact, $g$ is uniformly continuous.
Fix $\epsilon>0$. There is $\delta > 0$ such that $|g(c,d) -g(a,b) |<\epsilon$ whenever $\|(c,d)-(a,b)\| = \| (c-a,d-b) \| =$ $\|c-a\|+\|d-b\| <\delta$. Consequently, $|g(a,d) -g(a,b) |<\epsilon$ whenever $\|d-b\| <\delta$. This implies $\max_{a \in A} |g(a,d) -g(a,b) |<\epsilon$ whenever $\|d-b\| <\delta$.
By $\textbf{lemma}$, $|\max_{a \in A} g (a, c) - \max_{a \in A} g (a, b)| \le \max_{a \in A} |g (a, c) -g (a, b)| < \epsilon$. Hence $|f(c)-f(b)| <\epsilon$ whenever $\|c-b\| < \delta$. Thus $f$ is uniformly continuous. $\blacksquare$
