How can I think about this question:
I have a string of As and Bs and I want the number of permutations such that the distance between two Bs is at least 2
for n = 3, the number of valid strings is 4
BAA
AAB
ABA
AAA
for n = 6,
AABAAB is valid
BABAAA is not valid because the distance between the first two Bs is 1
AAAAAA is valid
BAAAAA is valid
ABAAAB is valid
Hint: Each acceptable string of length $n\ge3$ either begins with an A followed by an acceptable string of length $n-1$, or with a BAA followed by an acceptable string of length $n-3$.