First, we need to understand what are called like terms.
Like terms are numbers that are in the same categories: it could be constants, It could be numbers with same variables such as both having x or y or anyother alphabeth. It could also be numbers with the same power having coefficient in numbers.
Example:
2x + 3x
In this case, both numbers have x as the common terms. Hence you can add or subtract them together.
Another example:
5 + 7
Both are numbers. Also referred to as constant. Hence you can add or subtract them together.
Another example: