To solve an equation, we should isolate the variable by doing the reverse operations and simplify. It is sometimes easier to simplify at the beginning, and then again at the end.
-17=n-5+3n
-17=-5+4n
+5 +5
-12=4n
/4 /4
-3=n
Using the math above, we can see that n=-3.