These questions deal with factoring. (1+z+z^2)^2 and (p^2-pq+q^2)^2

I partially understand the second line which would be 1+z^2+z^4+2z+2z^2+2z^3 but I don't understand where the 2 comes from in the second half of that line.

p.s.(^2 means squared or cubed etc.)

Please help me out A.S.A.P.!

I have a quiz on this tomorrow!

Thank-you,

A.R.

Answered by Harley Weston.