Well, you are given three consectutive values which must correspond to n-1, n, and n+1. Put those into your formula and you have three equations to solve for the three unknown numbers, , d, and n.
But more fundamental and simpler, I think, for this question is that the difference between two consecutive terms is a constant- that is your "d". If three consecutive terms are 5x + 2, 7x + 4, and 10x + 6, the difference of the first two must equal the difference of the last two: [7x+ 4 - (5x+ 2)]= [(10x+ 5)- (7x+ 4)]. Solve that equation for x.