You can use the distributive property on which is
Once you've done that collect any terms with n in on one side and those without on the other side - this means you'll be able to factor out the common factor n
Ok I think I may have figured it out... Just to be clear:
1) distribute the d through (n-1) to make your equation
S = na + dn - d
2) pull out the n from na and dn to make
S = n(a + d) - d
3) now divide both sides by a + d to get
S/a+d = n - d
4) then add d to both sides to get the final answer of...
n = S + d/a + d
right?