Topic - n-th term

If x + 1 and -x + 17 are the second and sixth terms of a sequence with a common difference
of 5, find the value of x.