Express statement "The n is prime"as ‘for all’ assertion.

Your teacher’s formula is correct except when $n=1$, which it says is prime (see the final section); for consistency with their terminology I shall use “prime” in this answer to mean “non-composite”. Your problem seems to be that you do not realise that $n$ is a “free variable” in formula (0), which we ought to call $P(n)$ to emphasise that it says something about $n$, some natural whose primality interests us.

A free variable (in a given formula) is one that is not a “bound variable”, where a bound variable is one introduced by a quantifier, in the way that $p$ and $q$ are. A free variable refers to something outside the formula, while a bound variable does not refer to anything outside the formula: replacing $q$ by $r$ would not affect the meaning of $P(n)$.

Where you write “Not for all natural $q$ and $p$ true, that, if $q*p$ gives us some $n$, then either $q$ or $p$ equals $1$.” it would be more accurate to say “…if $qp$ gives us the particular $n$ we are interested in, …”. That is to say, in your example we are only interested in the case $P(15)$, i.e. your (0) with $n$ replaced by $15$; as you correctly observed, $P(15)$ is false, so $15$ is not prime. If you try it out, you should find that $P(5)$ is true.

Your “gives us some $n$” makes me feel that you may be thinking of (0) as: $$ (\forall q \in \mathbb N)(\forall p \in \mathbb N)(\exists n \in \mathbb N)[(n=pq) \Rightarrow (p=1 \lor q=1)] $$ i.e. “every product of naturals is $1$ or prime” (or even “given two naturals, one is $1$”!), which is of course false. If you rearrange it as $$ (\exists n \in \mathbb N)(\forall q \in \mathbb N)(\forall p \in \mathbb N)[(n=pq) \Rightarrow (p=1 \lor q=1)] $$ it says “some natural is $1$ or prime”, which is trivially true. Both these formulæ have $n$ as a bound variable, i.e. they are not statements about a particular $n$ but about $\mathbb N$ as a whole.

In step (9) you write (with “complex” replaced by “composite”):

• For some $n$ its $q$ and $p$ are not equal one, then we know that $n$ consist of two numbers, then it is composite.
• For another $n$ either $q$ or $p$ can be $1$, then we don't know if n is prime or composite, cause another number ($q$ or $p$) can be either composite or prime.

The first part is more or less right, though “its $p$ and $q$” is a bit odd, as $p$ and $q$ are not determined by $n$, but are just some naturals that may need to be checked to see if $n$ is prime. The second part is wrong: you are right that the case when either $p$ or $q$ is $1$ does not (on its own) settle the primality of $n$, but if all such $p$ and $q$ satisfy $ (n=pq) \Rightarrow (p=1 \lor q=1) $ that makes $P(n)$ true – that is what the universal quantifiers in $P(n)$ mean!

The case $n=1$

As pointed out the answer in the answer by Dan Brumleve, your teacher’s expression breaks down when $n=1$, though this seems to have nothing to do with your problems in understanding it.

Their expression $P(1)$ says $$ (\forall q \in \mathbb N)(\forall p \in \mathbb N)[(1=pq) \Rightarrow (p=1 \lor q=1)] $$ which is true: when the product of two naturals is $1$, then one of them is $1$ – indeed both are! But the conventional definition of a prime is that it should not be a “unit”, i.e. should not have a multiplicative inverse in $\mathbb N$. We can fix this by defining “$n$ is prime” as $n\neq 1 \land P(n)$. This is useful, as the primes are then the smallest set of naturals that generate $\mathbb N$ by multiplication. For $\mathbb Z$ there is no unique set of generators, but the sets are unique up to multiplying each element by one of the units $\{1,-1\}$.

Equally, their expression for “$1$ is not prime” becomes $$ (\exists q \in \mathbb N)(\exists p \in \mathbb N)(p > 1 \land q > 1 \land 1=pq) $$ which is false, again meaning that $1$ is prime.