In how many different ways can the flags be arranged in a line? One red flag, three white flags and two blue flags are arranged 
   in a line such that:
  
  $a.)$ No two adjacent flags are of the same color
  
  $b.)$ The flags at the two ends of the line are of different colors
  In how many different ways can the flags be arranged?


$\color{green}{a.)\ 6 }\\
 b.)\ 4 \\
 c.)\ 10 \\
 d.)\ 2$

I did 

Total ways$-$when same flags are considered as one 
$-$flags at the two ends of the line are of different colours[w-w,b-b]

$=\left(\dfrac{6!}{3!\times 2!}\right)-(3!)-(2)=52$

which is not in options.

I look for a short and simple way.

I have studied maths upto $12$th grade.
Hint:

If you do not start or end the line with a white flag then it is unavoidable that $2$ white flags will be adjacent.
You can arrange it like $$W @ W @ W @     OR     @ W @ W @ W$$
Where $$W = \text{White Flag}\\ @ = \color{blue}{\text{Blue}}/\color{red}{\text{Red}} \text{ flag}$$
White flags are more and $\color{red}{\text{red}}$ are $2$ and $1$. With this order, no two flags of same color will be adjacent.

Now, for $$W @ W @ W @$$ $W$'s can be arranged in only one order but $\color{red}{\text{red}}$ and \color{blue}{\text{blue}} can be arranged in $$\frac{3!}{2!} = 3$$ ways. Dividing $2!$ because it includes $2$ \color{blue}{\text{blues}} of same color.

Same for $$@ W @ W @ W$$

Hence, answer is $3 + 3 = 6$.