Let's denote the number of hours Sophie volunteered at the nursing home as \( x \).
According to the information given, the total number of hours Sophie volunteered last year was 171 hours, which includes 55 hours at the pet shelter. Therefore, we can set up the following equation:
\[ 55 + x = 171 \]
To find \( x \), we can subtract 55 from both sides of the equation:
\[ x = 171 - 55 \]
Now, let's do the subtraction:
\[ x = 116 \]
Thus, Sophie volunteered 116 hours at the nursing home last year.