Maybe I've misinterpreted the question, but it says the charges are Q, Q, -Q, -Q in cyclic order. I assumed that meant if we start at one corner and go round the square the charges are +Q then +Q then -Q then -Q i.e. the two +Q charges are next to each other, and likewise for the two -Q charges.