(b) Take, A and B to be always together as a single entity.
Now, total no. of children = 4 – 2 + 1 = 3
These can be arranged in 3! ways and A, B can be arranged among themselves in 2! ways.
Hence, no. of arrangements such that A and B are always together = 3! × 2! = 3 × 2 × 2 = 12