To find the equation of the line after it is translated, we start with the original line:
\( y = -x + 1 \).
Step 1: Translation of 1 unit to the right
When we translate the graph of a function \( y = f(x) \) to the right by \( h \) units, we replace \( x \) with \( x - h \). For \( h = 1 \), we replace \( x \) with \( x - 1 \):
\[ y = - (x - 1) + 1 = -x + 1 + 1 = -x + 2. \]
Step 2: Translation of 2 units up
Next, we translate the line \( y = -x + 2 \) upwards by 2 units. To do this, we add 2 to the output:
\[ y = -x + 2 + 2 = -x + 4. \]
Conclusion
After both translations, the equation of the line becomes:
\[ y = -x + 4. \]
Therefore, the answer is:
y = -x + 4.