Three point charges with values

1 q = 4 C,
2 q = 1 C, and
3 q = 7 C are placed on three consecutive corners of a square whose side measures a = 5 m. Point M lies at the fourth corner
of the square, diagonally across from 2 q. Point O lies at the center of the square. What are the values of the electric potential at point M and at point O? How much energy (supplied as work) is required to move a test charge q = 2 C from point M to point O? Assume the zero of electric potential is chosen to be at infinity.

The whole thing about POTENTIAL is that it adds as a scalar, NOT a vector.

So:
All that matters is how far each of our 1q , 2q, and 3q are from the test charge.
so lets find the voltage at the center of the square. That is the potential energy of a unit charge at that location.
well if I integrate the force on a charge +q in from infinity to distance d from a charge +Q I will have to do the following amount of work:
integral F d x = k q Q integral infinity to d of dx/x^2
= k q Q / d - k q Q / oo
= k q Q /d
SO
all I need is the final distances from the center (or later the corner)
d1, d2 , d3
for example for d1
d1 = (1/2)sqrt (5^2+5^2) = 2.5 sqrt (2)
same for d2 and d3
so
voltage (work done on 1 c charge) potential is
k (4 + 1 + 7) (1) / 2.5sqrt2
potential (work done on 2 c charge) is
k (4 + 1 + 7) (2) / 2.5sqrt2 because test charge was 2c not 1 c