$\sup_x(f) = \sup_x (g)$ . Show that there exists a $t$ such that $ f^2(t) + 5f(t) = g^2 +5g(t).$ Let $f,g: [0,1] \to [0,\infty)$ be continuous, non-negative functions such that $\sup_x(f) = \sup_x (g)$ for $x \in [0,1]$. Show that there exists a $t \in [0,1]$ such that $$ f^2(t) + 5f(t) = g^2(t) +5g(t).$$
I totally have no idea about how to approach to solve this problem. Could you help me to do that? Thank you!
 A: Let 
$$
h(x)=f^2(x) + 5f(x) -g^2(x) -5g(x)
$$
Since $f,g$ are continuous, there are $t_1,t_2\in [0,1]$ such that $f(t_1)=\sup_{x\in[0,1]}{f(x)}$ and $g(t_2)=\sup_{x\in[0,1]}{g(x)}$. If $t_1=t_2$, then $h(t_1)=0$, i.e. $f^2(t_1) + 5f(t_1) = g^2(t_1) +5g(t_1)$. 
If $t_1\ne t_2$, assume $t_1<t_2$ and f, g are not constant, then $h(t_1)>0$ and $h(t_2)<0$. By IVT, there is a $t\in[t_1, t_2]$ that $h(t)=0$, i.e. $f^2(t) + 5f(t) = g^2(t) +5g(t)$. 
A: Note that $\phi(x) = 5x+x^2$ is strictly increasing for $x \ge 0$.
Hence showing that there is some $t$ such that $\phi(f(t)) = \phi(g(t))$ is
equivalent to showing that there is some $t$ such that $f(t) = g(t)$.
Since $[0,1]$ are compact, there are $t_1,t_2$ such that
$f(t_1) = \sup_x f(x)$, $g(t_2) = \sup_x g(x)$, and we are
given $f(t_1) = g(t_2)$.
Let $\eta(s,t) = f(s)-g(t)$ and note that 
$\eta(t_1,t_2) = 0$, $\eta(t_1,t) \ge 0$ for all $t$ and
$\eta(s,t_2) \le 0$ for all $s$.
In particular, $\eta(t_1,t_1) \ge 0$, $\eta(t_2,t_2) \le 0$, hence
there is some $t^* \in [\min(t_1,t_2), \max(t_1,t_2)]$ such
that $\eta(t^*,t^*) = 0$, and so $f(t^*) = g(t^*)$.
