"An AP has a common difference of 3. Given the nth term is 32, and the sum of the first n terms is 185, calculate the value of n."

It is a question from the textbook and I looked up the answer in the back of the book and it is 10. The methods I am using just don't give me the answer 10. Clearly I am missing something.

I am sure that different countries have different notations.

I know that Sn=185=(n/2)(2a+(n-1)d) and Un=32=a+(n-1)d and d=3. I substituted in d and rearranged so they both equal a and combined them only to get the wrong answer.

So what should I have done? Just a quick explanation is needed so I can get the jist of it.

Thanks.