Your proof of $\exists x \, \lnot P(x) \vdash \lnot \forall x \, P(x)$ is perfect. However, your attempt for proving $\lnot \forall x \, P(x) \vdash \exists x \, \lnot P(x)$ is wrong, the rule $\forall_i$ on the top is not correctly instantiated because it does not respect the proviso about free variables: indeed, when you apply the rule $\forall_i$, $u$ is a free variable of an undischarged hypothesis, which is not allowed as explained here. (Note that this proviso is crucial to get only correct derivations, otherwise you could prove $\exists x \, P(x) \vdash \forall x \, P(x)$, which is not correct).
A correct derivation of $\lnot \forall x \, P(x) \vdash \exists x \, \lnot P(x)$ in natural deduction is the following:
$$
\dfrac{\dfrac{\lnot \forall x \, P(x) \qquad \dfrac{\dfrac{\dfrac{[\lnot \exists x \, \lnot P(x)]^* \qquad \dfrac{[\lnot P(x)]^{**}}{\exists x \, \lnot P(x)}\exists_i}{\bot}\lnot_e}{P(x)}RAA^{**}}{\forall x \, P(x)}\forall_i}{\bot}\lnot_e}
{\exists x \, \lnot P(x)}RAA^*
$$
Note that in this derivation the rule $\forall_i$ is correctly instantiated, since $x$ is not free in the (undischarged) hypothesis.
There is also a derivation using only one instance of the rule RAA, but it is longer and awkward, not really interesting.