Answer
18 arrangements
Work Step by Step
Number of ways in which 'b' follows 'a' immediately = 3! = 6
This is done by clubbing 'a' and 'b' together as 'ab' and using finding the total permutations with 'c' and 'd'.
Total number of ways to arrange letters a,b,c,d = 4! = 24
Ways in which 'b' does not follow 'a' = 24-6 = 18