The professor
is not as dumb as some people may be tempted to think.
Let the intersection cell of row $i$ and column $j$ be $(i,j)$. Let the chosen cell be $(x,y)$.
Therefore,
\begin{align}
B &=\sum_{(i,j) \mathrm{ is\ black}} (x-i)^2 + (y-j)^2\\&= \sum_{(i,j) \mathrm{\ is\ black}}(x-i)^2 + \sum_{(i,j) \mathrm{\ is\ black}}(y-j)^2\\&=x_b+y_b
\end{align}
Similarly,
\begin{align}
W&=\sum_{(i,j) \mathrm{\ is\ white}} (x-i)^2 + \sum_{(i,j) \mathrm{\ is\ white}}(y-j)^2\\&=x_w+y_w
\end{align}
Since, there are exactly 4 black and 4 white cells each row,
$$\sum_{(i,j) \mathrm{\ is\ black}} (x-i)^2=4\sum_{i=1}^8(x-i)^2=\sum_{(i,j) \mathrm{\ is\ white}} (x-i)^2$$
So, $x_w=x_b$
Similarly, $y_w=y_b$
Therefore, $B=W$
TM;DR (Too mathy, didn't read):
The first thing to understand is the sum of squares of distances from a cell to all black cells is the sum of squares of distances of the x coordinates $(x_b)$ plus the sum of squares of distances of the y coordinates $(y_b)$. This follows from Pythagoras/distance formula.
But since there are an equal number of black and white cells each row, The set of distances from black cells is actually the same set as the set of distances from white cells. Therefore $x_b$ and $x_w$ are summing the squares of the same set and therefore are equal. Similarly, $y_b$ and $y_w$ are equal.
Therefore B and W are equal.