Here's the solution.
We are asked to find the total number of ways in which 3 out of the 5 alphabets A, B, C, D and E can be arranged in a straight line such that A and B never come together.
In order to arrange 3 alphabets, we have to select 3 alphabets from the given 5.
This can be done in (5x4)/2 = 10 ways
However, out of these 10 selections, we need only those selections wherein A and B are not together.
Let's first find the number of selections in which A and B are selected. In this case, out of the 3 alphabets to be selected, A and B are always in. That means, we just need to select 1 more alphabet from the remaining 3 i.e. C, D and E. This can be done in 3 ways.
So the total number of selections in which A and B are together = 3
Therefore, of the total 10 selections, only 7 are such that A and B are not selected.
So, the number of ways of selecting 3 alphabets such that A and B are not selected = 7 ways.
Now, we are asked to arrange these 3 alphabets in a straight line. We know that 3 alphabets can be arranged in a straight line in 3! = 3x2 = 6 ways.
Hence, the total number of arrangements which do not include A and B together is
7x6 = 42 ways.
Hope this helps!