The question didn't ask you to calculate the probability of the event occurring, it only asked you what you thought an appropriate sample space would be for the problem.
I agree that the sample space of size $10!$ which details all of the $10!$ equally likely ways in which the ten people can be lined up is an appropriate one to use and one of the first that many people would think of.
As for actually calculating the probability, $3!7!$ would only count in this context with this sample space the number of ways in which the first three people were the friends arranged in some order and the following seven people were the others arranged in some order.
You missed counting arrangements where the friends appeared in the middle or at the end of the other people. To correct the count, break into cases based on how many people were to the left of our group of friends. There are eight possibilities: $0$ people to the left, $1$ person to the left, etc... on up to $7$ people to the left of our group of friends.