P = a + b + c
Where a, b, and c are the sides of the triangle.
So we just plug in the sides:
P = (3x + 7) + (4x) + (5x + 6)
Now we take out the parentheses:
P = 3x + 7 + 4x + 5x + 6
To combine like terms we look at each number and if they have certain things in common, we can add them.
For the variables, any number that has a variable next to it can be added if the variables share the same power and the same variable, for example:
2x + 5x = 7x
They both share x^1 so they can be added, on the other hand:
2x + 5x^2 = 2x + 5x^2
They cannot be added because x and x^2 are not the same.
Let's go back to the perimeter, we are going to go ahead and separate like terms:
P = (3x + 4x + 5x) + (7 + 6)
P = 12x + 13
3x + 4x + 5x = 12x
Now for number 2:
The like terms in here are 4w and -25w and 7 and -3. But the 7 is being distributed among th 4w-3 so let's look at it separately:
7(4w - 3) = 7(4w) - 7(3) = 28w - 21
The thing here is you can multiply ANY two terms regardless of if they are like terms, thus we can multiply 7 by 4w.
Let's plug that back into the original problem:
28w - 21 - 25w = (28w - 25w) - 21 = 3w -21
I hope you understand it now. ^_^