So to solve your question, we can use this:


So then

If we use the above formulas then:

And for

We will get:

And to simplify

Since we already calculated the individual parts, not put them together, so:

Now we have to add the like terms which are -6w and 3w. And also 1 and -12.
Rearranging the terms, we get:

And

And also

So combining that, we get:

Which is your final answer :)