I attempted this problem and this is what I have so far:
First, I considered the possible "cases".
If the string starts with $00$ or $11$, then the rest can be anything so there are $2\cdot 3^{n-2}$ such strings.
If the string starts with $2$, then there are $n-1$ strings that contain two consecutive $0$s or $1$s.
If the string starts with $22$, then there are $n-2$ strings that contain two consecutive $0$s or $1$s.
I came up with the recurrence relation: $$a_n=a_{n-1}+a_{n-2}+2\cdot 3^{n-1}.$$ However, the solution in my textbook says it is actually $$a_n=2a_{n-1}+a_{n-2}+2\cdot 3^{n-2}.$$ I can't seem to figure out why $a_{n-1}$ is multiplied by two.