Let $\hat K= [0,1]^d$ and $\hat K=\hat K_1 \cup \hat K_2 $, with $\hat K_i$ closed connected, with a non-empty interior, and $\hat K_1^\circ \cap \hat K_2^\circ=\emptyset$ . We denote as $\mathbb Q_p (\hat K)$ the space of polynomials with degree at most $p$ in each variable (tensor product space). We want to prove that there exists $C>0$ such that $$ \| \varphi \|_{L^\infty (\hat K_1)} \le C \| \varphi \|_{L^2(\hat K_2)}\qquad\forall\ \varphi\in\mathbb Q_p(\hat K). $$ Moreover, we would like to know how $C$ depends on the relative measures of $\hat K_1$, $\hat K_2$ and on the polynomial degree $p$.
Here, we show how we proceed. Let $\bar x\in \hat K_1$ be such that $|\varphi (\bar x)| = \| \varphi \|_{L^\infty (\hat K_1)}$. There are two cases:
- $\| \varphi \|_{L^\infty (\hat K_1)} < \| \varphi \|_{L^\infty (\hat K_2)}$;
- $\| \varphi \|_{L^\infty (\hat K_1)} \ge \| \varphi \|_{L^\infty (\hat K_2)}$.
If 1. holds, then there exists $\tilde x \in \hat K_2$ such that $\| \varphi \|_{L^\infty (\hat K_2)} = |\varphi(\tilde x)| > |\varphi(\bar x)| = \| \varphi \|_{L^\infty (\hat K_1)}$. We claim that, from the continuity of $\varphi$, there exist $C_1>0$ and $\varepsilon >0$ such that $$ \begin{cases} \forall x \in B_{\varepsilon} (\tilde x) \qquad |\varphi (x)| > C_1 |\varphi (\bar x)|,\\ B_{\varepsilon} (\tilde x) \subset \hat K_2. \end{cases} $$ Thus, $$ \| \varphi \|_{L^2(\hat K_2)}^2 \ge \int_{B_{\varepsilon}(\tilde x)} |\varphi(x)|^2 > C_1 \int_{B_{\varepsilon}(\tilde x)} |\varphi(\bar x)|^2 = C_1 |B_{\varepsilon}(\tilde x)| \| \varphi \|_{L^\infty(\hat K_2)}^2 \ge C_1 |B_{\varepsilon}(\tilde x)| \| \varphi \|_{L^\infty(\hat K_1)}^2. $$ If 2. holds, then $|\varphi(\bar x)|=\| \varphi \|_{L^\infty (\hat K_1)} \ge \| \varphi \|_{L^\infty (\hat K_2)}$. We claim that, from the continuity of $\varphi$, there exist $\varepsilon >0$ and $C_1>0$ such that $$ \begin{cases} \forall x \in B_{\varepsilon} (\bar x) \qquad |\varphi (x)| > C_1 |\varphi (\bar x)|,\\ | B_{\varepsilon} (\tilde x) \cap \hat K_2| \ne 0. \end{cases} $$ Thus, $$ \| \varphi \|_{L^2(\hat K_2)}^2 \ge \int_{B_{\varepsilon}(\bar x)\cap \hat K_2} |\varphi(x)|^2 > C_1 \int_{B_{\varepsilon}(\bar x)\cap \hat K_2} |\varphi(\bar x)|^2 = C_1 |B_{\varepsilon}(\bar x)\cap \hat K_2| \| \varphi \|_{L^\infty(\hat K_1)}^2. $$ So, we are left with the choices of $\varepsilon$ in both cases. Do you think this is the right strategy? Any ideas on how to finish?
This should follow from the equivalence of norms on finite dimensional spaces. What is interesting is that $\|\cdot\|_{L^\infty(K_1)}$ and $\|\cdot\|_{L^2(K_2)}$ are norms on $\mathbb Q_p(K)$. Let's sketch the proof that this is true for the $L^2$-norm. The norm axioms are trivial other than $\|v\|_{L^2(K_2)}=0$ implies $v=0$ on $K$ (note that this property is special to polynomials). If $\|v\|_{L^2(K_2)}=0$, then $v=0$ in $K_2$, and therefore is zero inside a $d$-dimensional ball in $K_2$. Therefore, there are $d$ Hyperplanes on which $v$, $\nabla v$, $D^2v$, and so on are all zero. We can then use the fact that if a polynomial $v$ of degree $p$ vanishes on a hyperplane $L:=L(x)$, then $v = Lv'$, where $v$ is of degree $p-1$. We can piece this together (also applying it to the derivatives) to find that $v$ must by identically zero (i.e., all the degrees of freedom of $v$ are exhausted). This holds everywhere, and therefore $\|\cdot\|_{L^2(K_2)}$ is a norm on $\mathbb Q_p(K)$. We can argue similarly for $\|\cdot\|_{L^\infty(K_1)}$.
Combining the fact that all norms are equivalent on finite dimensional spaces with a scaling argument, we obtain the desired estimate. To get the explicit dependence, on the volumes of $K_1$ and $K_2$, this comes directly from the scaling.