lets say ur points are (1,2)(3,4)
d = sqrt (x2 - x1)^2 + (y2 - y1)^2
u would label ur points
set 1 (1,2)...x1 = 1 and y1 = 2
set 2 (3,4)...x2 = 3 and y2 = 4
or u could label them this way..
set 1 (3,4)...x1 = 3 and y1 = 4
set 2 (1,2)...x2 = 1 and y2 = 2
u have to do (x2 - x1)^2 and (y2- y1)^2....but u can label ur sets of points different. Just make sure u keep ur sets together. Does that make sense ?