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$
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.