6. For each real number $x, f(x)$ takes the minimum value among $x^{2}, 6-x, 2 x+15$, then the maximum value of $f(x)$ is $\qquad$ .
Solve:
As shown in the figure, plot the graph of $f(x)$ in the coordinate system, then
$$
f(x)_{\max }=f(-3)=9 \text{. }
$$