Thin lens formulae Hi I have a question about applying the thin lens formula 
$$ \frac{n_1}{s_o} + \frac{n_2}{s_i} = \frac{n_2 - n_1}{R} \,\text{thin lens formula}$$
for a single lens emerged in medium $n_2$ in the paraxial approximation.
Take a look at this picture: 

I'm supposed to recover the following formula for a thick lens:
$$\frac{n_m}{s_{o1}} + \frac{n_m}{s_{i2}} = (n_1 - n_m)
\left( \frac{1}{R_1} - \frac{1}{R_2} \right) + \frac{n_1 d}{s_{i1} (s_{i1} - d)} \,\text{thick lens formula}$$
I have the solutions to this but I really don't get how this works.
First they give a hint that the first step should be to calculate $P^{'}$ for "once we have that, we can assume that the source has moved to $P'$ and work out the effect of the second surface."
$i. )$ This I already don't really get. Is $P'$ the Image of $P$?  Why would it be over there? I think I'm missing a huge part here...
$ii. )$ Now they start with the thin lens formula: $$\frac{n_m}{s_{o1}} + \frac{n_1}{s_{i1}} = \frac{n_1 - n_m}{R_1}$$This I don't get in the slightest. I have no clue what happened here. I woul'dve thought that we start from S and make our way to the lens giving: $\frac{n_m}{s_{o1}}$ but then what do they do? Why does the ray travel $s_{i1}$ in medium $n_l$? 
Once I get how they get this equality I think I can do the one for the second surface but I'm really lost here.
 A: Note that geometrics optical notation is not completely standardized, although it should be (Grievenkamp has been attempting to standardize it for years).
I will assume that rays are propagating from left to right.


*

*Typically you can think of rays in different optical spaces.  Each optical space can be thought of as extending the $z$ axis to $\pm \infty$.  All rays can also be extended to $\pm \infty$ in $z$.  Then, refraction occurs between optical spaces.  It works in the following way: the first optical space is the space in which the object lies.  You can plot some rays, eventually they will intersect some surface.  You compute the refraction at that surface (i.e. ray angles change).  These new rays, with new angles, are now considered to be in a different optical space.  You can you extend them forward and backward along $z$.  This is what they are doing with $P'$.  $S$ is the real point, in object space, then $P'$ is the apparent point which the rays are coming from in order to intersect the second surface.  $P'$ is not the image of $P$, it is the image of $S$ for the first surface only, and it is virtual in the above picture.  Notice that $P'$ must be thought of as being in index $n_l$.

*This is why they can use your formula $$ \frac{n_m}{s_{o1}} +
    \frac{n_l}{s_{i1}} = \frac{n_l - n_m}{R_1} $$
The ray isn't actually traveling $s_{i1}$ in medium $n_l$, but because it is virtual in the optical space with index $n_l$, this is where the imaging equation (image space for the first surface) puts it so that you can continue with the exercise.

