I suspect a formal proof would be a bit lengthy and might require weak mathematical induction. But it is easy to show the basic idea when n = 2.
xˉ=2x1+x2⟹2xˉ=(x1+x2).
(j=1∑2(xj−xˉ)(yj−yˉ))=(j=1∑2xjyj−xjyˉ−xˉyj+xˉyˉ)=
(x1y1−x1yˉ−xˉy1+xˉyˉ)+(x2y2−x2yˉ−xˉy2+xˉyˉ)=
{(x1y1−xˉy1)+(x2y2−xˉy2)}−yˉ(x1+x2)+2xˉyˉ=
(j=1∑2xjyj−xˉyj)−yˉ(2xˉ)+2xˉyˉ=
(j=1∑2(xj−xˉ)yj)−2xˉyˉ+2xˉyˉ=(j=1∑2(xj−xˉ)yj).