I am so confused about correlation equations. I don't know at all how to use them

r= W (x-xXy-y)=Sxy
__________________
n

*the equation doesnt look exactly like this but it is similar, if i can get any help at all that would be great

example question: