Use local variables to temporally store values from picked objects.
Pick 1, store the position in local variables, 'x1' and 'y1'
Pick 2, store the position in local variables., 'x2' and 'y2'
(cartesian)
Middle X = x1 + ((x2 - x1) / 2)
Middle Y = y1 + ((y2 - y1) / 2)
(or polar)
a= angle(x1,y1,x2,y2)
d = distance(x1,y1,x2,y2)
Middle X = x1 + ( cos(a) * (d/2) )
Middle Y = y1 + ( sin(a) * (d/2) )
Create object on Middle X and Middle Y.