#n^(th)# term of an arithmetic sequence #{a,a+d,a+2d,..}#, where #a# is first term and #d# is difference between a term and it's preceding term is given by #a+(n-1)d#.
Here #a=5# and #d=7# so #n^(th)# term will be #5+(n-1)xx7=5+(n-1)xx7=5+7n-7# or #7n-2#