What your professor is saying is, let's consider Ks and Os as Xs. Then there are $\frac{10!}{4!3!}$ ways to arrange the string.
In the generated strings, since _both_ Ks must be before any of the Os, the first two Xs must be Ks and the last 2 Xs must be Os. This gives you exactly 1 correct string with Ks and Os from the string with Xs, so their numbers are identical.