here,
height of the object, ho = 50 cm
height of the image, hi = -20 cm
the distance of the image, v = 10 cm
now, magnification formula for a lens is
m = v/u = hi/ho
so, the object distance will be
u = v.(ho/hi)
or
u = 10.(50/20)
thus,
u = -25 cm
so, the focal length will be
1/f = 1/v - 1/u
or
1/f = 1/10 + 1/25
1/f = 0.1 + 0.04
so, the focal length of the convex lens will be
f = 7.14 cm