Like terms have the same unit. Not like terms do not have the same unit. We cannot add nor subtract terms that are not like or not similar to each other.
a. 5 years and 2 cars are not like terms because they do not have the same unit. The other one is "car" while the other is "years".
b. 9 lemons and 3 grams are not like terms as well because they do not have the same unit. The other one is "lemons" while the other is "grams".
c. 10 yards and 4 yards are like terms because both have the same unit that is yards. Hence, we can add them. The answer is 14 yards.