Answer: 9x and -4x
Explanation:
Ignore the numbers.
If the letters are the same, and the power that the letters are to is the same, they are like terms.
For example, in the expression you provided, if you ignore the numbers you have x + xy - x + y + x^2
There are two 'x's in there, so they would be like terms. The reason why x^2 would not be a like term to them is because it is to the power of 2, which is not the same power as the other two 'x's.
From that, you can tell which terms are like terms. Then you can check the numbers in front of them and simplify if you want to by adding or subtracting depending on the sign (you just add or subtract the numbers in front, which are called coefficients).
The simplified version of your expression would be:
6x^2 + 6xy + 5x + 8y
Because we collected the like terms '9x' and '-4x' which gives '5x'.