(7/w+2)+(-8w-2/w^2+2w)-(6-w/w)

I assume you mean

7/(w+2)+(-8w-2)/(w^2+2w)-(6-w)/w

Note that w^2 + 2w is w(w+2), so that's the common denominator to use. Multiply through by that.

[7w - (8w+2) - (6-w)(w+2)]/(w(w+2))

(7w - 8w - 2 + w^2 - 4w - 12)/((w+2)w)

(w^2 - 5w -14)/((w+2)w)

(w+2)(w-7)/((w+2)w)

= (w-7)/w