remember the rational function will produce a quotient, which when multiplied by the divisor will yeild the original R(z). So the second expression is in the form R(z) = quotient x divisor.
More specifically (z-a_j)^uj X S_j(z) .. Where as they said S_j(z) is the rational fuction ( which was the quotient ). It is not that much about "deriving" the third form but more showing that the complex function R(z) is a product of the number of roots ( z-a_j) and the quotient S_j(z).
The equation labled (3) is not derived directly from equation (2). What they have done is write the product of all terms in the numerator of (2) as P(z) and the product of all terms in the denominator as Q(z):
R(z)= P(z)/Q(z).
Then they look at R(z)- c= P(z)/Q(z)- c. Getting the common denominator (Q(z)) you have P(z)/Q(z)- cQ(z)/Q(z)= (P(z)- cQ(z))/Q(z)