the number of ways to order a line from a group of 6 women and 2 men such that 2 men stand on either end? Given a group of 6 women and 2 men, I have to find the number of ways in which atleast one man is on one end of the line.
I tried to separate the cases where both men take the ends and when only one man takes an end.
When both men take ends:
$$2! \times 6!$$
When only one man takes an end:
$$ \binom{2}{1} \times \binom{6}{1} \times 5! \times 2 $$
However, I am getting an incorrect answer(It is 18720), could someone help me?
Thank you for your help in advance.

When only one man is at one end, it should be
$ \displaystyle \binom{2}{1} \binom{6}{1} \cdot 2! \cdot 6! = 17280$
That is we choose one of the men and one of the women to be at two ends and as they can swap their places, we multiply by $2!$. Then remaining six people can be arranged in $6!$ ways.
When both men are at two ends, it is $~2! \cdot 6! = 1440~$, as you mentioned.
Adding them, you get the right answer.
Using complementary method -
When no man is at either end, we have $5$ places for the first man and $6$ for the second. Women can be arranged in $6!$ ways. Subtracting it from total number of ways to arrange all $8$ of them, we should get the desired number of arrangements. That is,
$8! - 5 \cdot 6 \cdot 6! = 18720$
