changes made:

made the mathematical representation consistent for mass1 to be not shown.
add scale1 to make the formula consistent
gy= k*q1*scale1/((xtest-x1)*(xtest-x1))*(xtest-x1)/Math.abs(xtest-x1)+ k*q2*scale2/((xtest-x2)*(xtest-x2))*(xtest-x2)/Math.abs(xtest-x2);
Vy = k*q1*scale1/(Math.sqrt((xtest-x1)*(xtest-x1)))+ k*q2*scale2/(Math.sqrt((xtest-x2)*(xtest-x2)));

enjoy!