4. Let $P(x, y)$ be a point on $|5 x+y|+|5 x-y|=$ 20. Find the maximum and minimum values of $x^{2}-x y+y^{2}$.
4. After simplifying and discussing the size of $|5 x|$ and $|y|$ from the equation $|5 x+y|+|5 x-y|=20$, we easily get $x= \pm 2$, $|y| \leqslant 10$ or $|x| \leqslant 2, y= \pm 10$. Therefore, the graph of the equation is a rectangle $A B C D$, where $A(2,-10), B(2,10), C$ $(-2,10), D)(-2,-10)$. By symmetry, we only need to consider the sides $A B$ and $B C$, and it is easy to see that on $A B$.
$$
\begin{array}{l}
Q=x^{2}-x y+y^{2}=4-2 y+y^{2}, \\
3 \leqslant Q \leqslant 124 ; \\
\text { on } B C, 84 \leqslant Q \leqslant 124 . \\
Q_{\text {max }}=124, Q_{\text {min }}=3 .
\end{array}
$$