<s>[INST] Six people (half are female, half are male) for seven chairs. Problem:
Suppose there are $7$ chairs in a row. There are $6$ people that are going to randomly
sit in the chairs. There are $3$ females and $3$ males. What is the probability that
the first and last chairs have females sitting in them?
Answer:
Let $p$ be the probability we seek. Out of $3$ females, only $2$ can be sitting at the end of the row. I consider the first and last chairs to be at the end of the row.
\begin{align*}
p &= \dfrac{ {3 \choose 2 }  3(2) (4)(3)(2) } { 7(6)(5)(4)(3)(2) } \\
p &= \dfrac{ 3(3)(2) (4)(3)(2) } { 7(6)(5)(4)(3)(2) } \\
p &= \dfrac{ 3(4)(3)(2) } { 7(5)(4)(3)(2) } = \dfrac{ 3(3)(2) } { 7(5)(3)(2) } \\
p &= \dfrac{ 18 } { 35(3)(2) } \\
p &= \dfrac{ 3 } { 35 }
\end{align*}
Am I right?
Here is an updated solution.
Let $p$ be the probability we seek. Out of $3$ females, only $2$ can be sitting at the end of the row. I consider the first and last chairs to be at the end of the row.
\begin{align*}
p &= \dfrac{  3(2) (5)(4)(3)(2) } { 7(6)(5)(4)(3)(2) } \\
p &= \dfrac{  (5)(4)(3)(2) } { 7(5)(4)(3)(2) } \\
p &= \dfrac{1}{7}
\end{align*}
Now is my answer right?
 [/INST] We can think of the seating assignment as a random permutation of $7$ items (the three males, the three females, and the empty seat). This random permutation puts a female in the first chair with probability $\frac37$. Conditional on having done that, there are $2$ females left, so one of them ends up in the last chair with probability $\frac26$.
Overall, $p = \frac37 \cdot \frac26 = \frac17$.
There's also the brute force approach: $p = \frac{20}{140}$ by counting.

With an approach whose denominator is $7!$, the numerator should be $\binom32 \cdot 2 \cdot 5!$: we pick the $2$ females at the ends, pick the order they sit in, and then pick the permutation of the middle. This also gives $\frac{\binom 32 \cdot 2 \cdot 5!}{7!} = \frac{3\cdot 2}{7 \cdot 6} = \frac17$.
</s>