For lens the distance of the image formed from the lens is given by 1/v - 1/u = 1/f where u, v and f are distance of object, distance of image and focal length respectively.

Since, the sign convention for S_{1} and S_{2} is just opposite. Hence,

Solving this equation, we get x = 6 cm. Therefore, the lens should be kept at a distance of 6 cm from either of the object.