Why does the + 18 in step 2 become -18 in the working out below. Please explain in detail and this formula is calculating the first derivative of a function.

Step-by-step explanation:
18/x is the same as 18•x-¹
derivative of ax^n=n•ax^n-1
derivative of 18•x-¹= -1•18•x-²
= -18x-² which is the same as -18/x²
hence 2-18/x²