You can use the relation f=(D^2−X^2)/4D to solve such kind of problem
in this formula f is the focal length of the convex lens
D distance between the object and the screen
x is the distance between the two position of the lens..
f=(100^2−20^2)/4x100
=9600/400=24 cm
the eqation v-u= 20 is obtained when you consider the image formed by the lens at its first location as object