The following applet shows light paths for converging lens.
Initially, there is only one convex lens.
The blue arrow represents object and green arrow is the image.
You can drag objec position and change it's height (drag arrow tip), too.
Two small cyan dots represent focus points (d 8)rag it to change focus length of the lens).
Drag the center of the lens to change it's location. Drag top of the lens to change the height of the lens.
For the first lens: $\tfrac{1}{P_1}+\tfrac{1}{q_1}=\tfrac{1}{f_1}$

Click 2nd Lens to add another convex lens. You can study how light paths were refracted to form the image.
If the separation between two lens is $d$, and assume second lens is at the right side of the first lens.
Then, $p_2=d-q_1$ , and the images form can be found at $\tfrac{1}{q_2}=\tfrac{1}{f_2}-\tfrac{1}{p_2}$.