here is a solution that I found, but uses a round table instead of a row.

How many ways can 5 man and 7 women be seated at a round table with
no 2 men next to each other?
Solution. First place the women in 6!. Now there are 7C5 ways to pick
5 spots for the men so that they are not adjancent. Finally, in each
of these 5 spots, the men can be placed in 5! ways. Hence, there are
5!6!7C5 = 1814400.

Do it this way:
First place the women in order. This is 5!. Then place the men in the spaces between the women. There are 6 spaces (including the ends) so you have C(6, 4) * 4! ways to place the men, and 5! * C(6, 4) * 4! altogether.

Do it this way:
First place the women in order. This is 5!. Then place the men in the spaces between the women. There are 6 spaces (including the ends) so you have C(6, 4) * 4! ways to place the men, and 5! * C(6, 4) * 4! altogether.