For real image
Given , M = -3
m = v/u
-3 = v/u
v = -3u ...................... (i)
by lens formula
1/f = 1/v - 1/u
1/30 = -1/3u - 1/u
1/30 = -4/3u
u= -4 x 30/3 = - 40 cm
for virtual image
m= +3
m= v/u
3= v/u
v=3u
by lens formula
1/f = 1/v - 1/u
1/30 = 1/3u - 1/u
1/30= -2/3u
u= -2 x 30/3 = -20cm.
therefore the two positions of the object are:
-40 cm and -20 cm