Here is the question:
Max, Zoe, Perry, Carly, Peter, and Ava decide to stand in a queue.
a) How many lines can they form if a girl must be the leader and another girl must be at the end of the line?
I get two answers. First is that we have $5!$ ways to order the remaining people and then $2!$ ways to permute the first and last line. So it would be $5!2!=240$
However I also think there are 3 girls who can be first, and 2 last, then we have $3 \cdot 4 \cdot 3 \cdot 2 \cdot 1 \cdot 2=144$
Which one is correct?
EDIT: I'm assuming girls are Zoe, Carly, Ava and boys are Max, Perry, and Peter.
Your second solution is correct.
There are three girls who could fill the first position in the queue, which leaves two girls who could fill the final position in the queue. The remaining four people can be arranged between them in $4!$ ways. Hence, there are $$3 \cdot 2 \cdot 4! = 144$$ ways in which the three boys and three girls could be arranged in line so that the first and last positions are filled by girls.