The second term = -17 which means that you added - 7 to - 10.
So d must be - 7
The formula must be
an = a1 + (n - 1)*d
an = -10 + (n - 1)(-7)
You might wonder why it is n - 1. The reason is because the first term is already added on the right side. The -1 means that we have already included the first term.
We should try the formula out to see what it does. Let's find a4