But for the second equation, why the left hand side is nb/s2+nc/s'2 instead of nc/s2+nb/s'2?

You always have to be careful which sign convention you are using, but your question does not involve this.
You have 3 media involved. R & H label these a,b and c.
a is air
b is the lens
c is air again.
So refraction at the first surface is air to lens.
A real image is formed within the lens by the first refraction.
so the first equation is a passing to b with
S1 in air (na) and S'1 in lens (nb)
So the equation is
na/S1 + nb/S'1 = etc
This real image becomes the object to the second refraction.
This refraction is lens (nb to air (nc)
So the equation is
nb/S2 + nc/S'2 = etc
R&H then make the point that
S2 = S'1
(what horrible, clumsy notation)
and use this to make a substitution and perform some algebra to get the lensmaker's equation.
Does this help?
This becomes a virtual image for the