The formula :
$NOT(∃x.P(x).∀y.P(x,y).∃z∃k.P(z,k))$
is not correctly written; the issue is not with the dots after the quantifiers; we can delete them and we have still an "un-grammatical" formuala :
$NOT(∃xP(x).∀yP(x,y).∃z∃kP(z,k))$.
The formula is meaningless exactly as is meaningless the natural language expression :
"there exist a prime number all prime numbers are ..."
$∃xP(x)$ is a formula correctly written; thus it can be part of a more complex formula containing also the formula $∀yP(x,y)$ only if there is a connective : $\land, \lor, \rightarrow, \leftrightarrow$ "joining" them.
Having said that, the basic rules for managing the quantifiers are :
$\forall \lnot$ is equivalent to : $\lnot \exists$
$\lnot \forall$ is equivalent to : $\exists \lnot$.
Thus, your example :
$NOT(∀xP(x)) \leftrightarrow ∃x NOT(P(x))$
is correct.
With more "complex" formulae, like e.g. :
$NOT (∀xP(x) \lor ∃y Q(y))$
we have, by De Morgan's laws :
$NOT (∀xP(x)) \land NOT (∃y Q(y)) \leftrightarrow \exists x NOT P(x) \land \forall y NOT Q(y)$.
Examples from your courseware are :
$∀n ∈ Evens ∃p ∈ Primes ∃q ∈ Primes (n = p + q)$ [page 75]
all the quantifers prefix a formula (a "matrix") and the scope of all three quantifiers is the formula : $(n = p + q)$.
Thus, its negation will be :
$\lnot (∀n ∃p ∃q (n = p + q)) \leftrightarrow ∃n \lnot (∃p ∃q (n = p + q)) \leftrightarrow \ldots \leftrightarrow ∃n ∀p ∀q \lnot (n = p + q)$.
In the case of :
$∃x∀yP(x, y) \rightarrow ∀y∃xP(x, y)$ [page 77]
we have two sub-formulae : $∃x∀yP(x, y)$ and $∀y∃xP(x, y)$ "joined" by the connective : $\rightarrow$ (IMPLIES).
Here we have to apply first the rule for the negation of a formula with $\rightarrow$, i.e. : $\lnot (p \rightarrow q)$ is equivalent to : $p \land \lnot q$, in order to "move inside" the negation sign, followed by the rules for the negation of quantifiers.
Thus :
$\lnot (∃x∀yP(x, y) \rightarrow ∀y∃xP(x, y)) \leftrightarrow ((∃x∀yP(x, y) \land \lnot ∀y∃xP(x, y)) \leftrightarrow ((∃x∀yP(x, y) \land ∃y∀x \lnot P(x, y))$
I think you have more or less understood the issue. If your formula has free variables, it is an 'open' formula with no specific truth value. Quantifiers let you form 'closed' formulae (called sentences) that have a specific truth value (given any model). Note that if the model has a finite domain, and you are only interested in talking about that single model, then you can easily replace "$\forall$" by an appropriate conjunction, and "$\exists$" by an appropriate disjunction. However, it is impossible to do so when you want to make statements about arbitrary models (even if they are guaranteed to be finite).
In some mathematical writings, people conventionally assume that all free variables are implicitly universally quantified, but that just means that the quantifier is merely hidden, and not that it was actually 'removed'. Also, under that same convention, the existential quantifier cannot be expressed with a quantifier-free formulation. For example, "$\forall x \exists y ( x \ne y )$" is one way of saying that there is more than one object. By the convention "$x \ne y$" would mean that every $x$ is distinct from every $y$, which is obviously different.
Furthermore, you cannot arbitrarily change the convention and stipulate that different variables refer to different objects, otherwise you cannot say "$\exists x \forall y ( x = y )$" to mean that there is exactly one object.
The bottom-line is that no matter what convention you choose, you have to have some mechanism for expressing quantification otherwise you would never be able to handle classical logic.
Best Answer
First of all, please know that these are not equivalences in the strict sense of logical equivalence ... with $n$ terms in $P(x_1) \land ... \land P(x_n)$ the best we can say is that that statement will have the same truth-value as $\forall x \ P(x)$ for any domain with $n$ elements, and where $x_1$, $x_2$ ... are treated as constants that respectively denote each of those $n$ different objects. Indeed, to make that clear, I would use $c_i$'s rather than $x_i$'s
Still, as long as you are careful and understand this restriction, you can indeed usefully work with this 'equivalence' ... which I'll denote by $\approx$
Now to your question. If you have multiple quantifiers you can just work them out step by step:
$$\exists x \forall y \ P(x,y)\approx$$
$$\forall y \ P(c_1,y) \lor \forall y \ P(c_2,y) \lor .... \lor \forall y \ P(c_n,y) \approx$$
$$(P(c_1,c_1) \land P(c_1,c_2) \land ...P(c_1,c_n)) \lor (P(c_2,c_1) \land P(c_2,c_2) \land ...P(c_2,c_n)) \land .... \land (P(c_n,c_1) \land P(c_n,c_2) \land ...P(c_n,c_n))$$
You can also work this out inside out:
$$\exists x \forall y \ P(x,y)\approx$$
$$\exists x (P(x,c_1) \land P(x,c_2)\land ... \land P(x,c_n)\approx$$
$$(P(c_1,c_1) \land P(c_1,c_2) \land ...P(c_1,c_n)) \lor (P(c_2,c_1) \land P(c_2,c_2) \land ...P(c_2,c_n)) \land .... \land (P(c_n,c_1) \land P(c_n,c_2) \land ...P(c_n,c_n))$$