Answer
See below.
Work Step by Step
$(f\circ g)(x)=f(g(x))=f(x-1)=-(x-1)^2-2(x-1)+1=-x^2+2x-1-2x+2+1=-x^2+2$
$(g\circ f)(x)=g(f(x))=g(-x^2-2x+1)=(-x^2-2x+1)-1=-x^2-2x$
You can help us out by revising, improving and updating this answer.
Update this answerAfter you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.