Another way to say that is that we can add a 0 to any string and still have an allowable string. But we have to be more careful about adding a 1 or a 2.
So the number of strings of length n ending in a 0 is and therefore the number ending in a 1 or a 2 is .
Now, how many strings of length n+1 are there? For each of the n-strings ending in a 0 we can get three (n+1)-strings. For each of the n-strings ending in 00 we can also get three (n+1)-strings. But for each of the n-strings ending in x0 (where x = 1 or 2) we can only get one (n+1)-string. Take that information and make it into a recurrence relation.