$x_n$ denote the no. of the binary string of length n that contains no consecutive 0's.
Either the string can end with 0 or 1.
If the string ends with 1 then we will find $x_{n-1}$. (The no. of the binary string of length n - 1 that contains no consecutive 0's.).
$\underbrace{ x_{n - 1} }$ 1
If the string ends with 0, then second last string must be 1. (Think !). Now, we will find $x_{n-2}$, the no. of the binary string of length n - 2 that contains no consecutive 0's.
$\underbrace{ x_{n-2}}$ 10.
Recurrence relation,
$x_1$ = 2
$x_2$ = 3
$x_n$ = $x_{n-1}$ + $x_{n-2}$ | n > 2.