Given:
Total number of students, n=12.
The average score of 12 students, a=85.
After Bob took the test, the number of students attended the test, N=13.
The new average score, A=82.
The total score of 12 students is the product of their average score and the number of students.
Hence, the total score of 12 students is,

The total score of 13 students is,

Now, Bob's score can be calculated as,

Therefore, Bob's score on the test is 46.