Problem:

My solution: T3(x) = x - (x^3)/3 + (x^5)/5 - (x^7)/7

T3(pi/6) = pi/6 - (pi/6)^3/3 + (pi/6)^5/5 - (pi/6)^7/7 (unsimplified)

Given solution:

I just don't understand the methodology. I thought it was a matter of determining the corresponding Taylor series of the function, writing it out to the nth term specified, and then substituting directly. Yet, that doesn't look like what was done in the given solution. Could someone please help me out?