2. Answer. 300
Solution. We claim that the school must be built in $Z$. Suppose the school is to be built at another point $A$. The change in distance travelled
$$
\begin{array}{l}
=300 Z A+200 Y A+100 X A-200 Y Z-100 X Z \\
=100(Z A+A X-Z X)+200(Z A+A Y-Z Y) \\
>0
\end{array}
$$
by triangle inequality. Thus, $\min (x+y)=0+300=300$.
2. Three towns $X, Y$ and $Z$ lie on a plane with coordinates $(0,0),(200,0)$ and $(0,300)$ respectively. There are 100,200 and 300 students in towns $X, Y$ and $Z$ respectively. A school is to be built on a grid point $(x, y)$, where $x$ and $y$ are both integers, such that the overall distance travelled by all the students is minimized. Find the value of $x+y$.