for both the lens you will get one image each of the source and as you can find out the distance betwen them
=2*h where h is the height of image in any case (by height = distance from the respective principal axis)
this you can take as d
further you will get the distance D from the screen which will be the distance from the image s
so after that you apply regular formula and get the answers
one more point S1 and S2 will not be the ones shown in the diagram they will be on the other side of the lens