You have proved $∀x(P(x)→P(x))$ with a derivation in first-order logic.
You have not proved $∀P∀x(P(x)→P(x))$, simply because this is not a well-formed formula of f-o logic; in f-o logic, the quantifier $\forall P$ is not allowed.
But the above derivation is schematic, i.e. you can "recycle" it for whatever predicate you want, and it is still valid.
If we "apply" our first-order logic to the language of elementary arithmetic, with constant symbol $0$ for the number "Zero", (binary), function symbols $+$ and $\times$ for the operations of "addition" and "multiplication" respectively, and (unary) function symbol $S$ for the "successor", (binary) predicate symbol $<$ for the relation "less then", we can apply the above schematic derivation to the (unary) predicate $x \ge 0$ [which is an abbreviation for : $\lnot (x < 0)$] in place of $P(x)$ to have :
$\vdash \forall x((x \ge 0) \rightarrow (x \ge 0))$.
The sentence above is a theorem of first-order arithmetic because it is a (well-formed) formula in the language of first-order arithmetic which is provable, due to the fact that it is an instance of a "law" of first-order logic (i.e. a valid f-o formula).
In second-order logic the quantifier $\forall P$ is allowed; thus the formula $∀P∀x(P(x)→P(x))$ is well-formed.
In SOL we have also the $\forall^2$-I rule, which allows us to add to the above derivation the final step concluding with : $∀P∀x(P(x)→P(x))$.
What is the difference ?
In SOL, if we agree on the "intuitive" semantics, let $D$ be the domain of the interpretation (where the individual varibale $x$ range); then the predicate variable $P$ range over all the subsets of $D$.
If we are interpreting an arithmetic formula, the domain $D$ is the set $\mathbb N$ of natural numbers, which has countable infinite ($\aleph_0$) objects .
Thus the predicate $P$ range over the power-set of $\mathbb N$, which has $2^{\aleph_0}$ objects (subsets of $\mathbb N$).
In FOL, the "schematic" $∀x(P(x)→P(x))$ can be instantiated with any (unary) predicate expressible in the language of f-o arithmetic.
An unary predicate is an open formula with only the variable $x$ free. A formula of a language with a finite number of symbols is a finite string of synbols; thus, in f-o language for arithmetic we can form only countable many open formulae, i.e. we can express only countable many unary predicates.
Thus, FOL has not the same power as SOL.