Universal Generalisation ($\forall$ - I) With this deduction rule, in the premise of the rule: the term to be substituted for a variable must be arbitrary (refer to an arbitrary d $\in$ D).
What constitutes arbitrary and not arbitrary?

*

*$ P(a) \quad\quad Premise$

*$ \forall x P(x) \quad (1), \forall-I: a/x$
Would term john not be considered arbitrary and thus line 2 be incorrect?

*

*$ P(john) \quad Premise$

*$ \forall x P(x) \quad (1), \forall-I: john/x$
 A: First of all, I hope you understand the intuition behind this:
Just because some specific object has some property obviously does not mean that all objects from the domain have that property.
However, if an arbitrary object from the domain has some property, then all objects do.
And just to be clear: by 'arbitrary' object we mean: we know and have assumed nothing about this object other than that it is some object from the domain.
Now, how exactly this is being formalized in a specific formal system depends on a lot of formal details. In some systems, variables are used to denote arbitrary objects, but in other systems, 'temporary constants' are being used, typically in combination with certain kinds of subproofs.
So, if you ask me if whether you can apply $\forall \ I$ to infer $\forall x \ P(x)$ from $P(John)$, I really cannot answer that; it all depends on the specifics of the system you are using.
A: The $(\forall \text I)$ rule is:

if $\Gamma \vdash \varphi[x/a]$, then  $\Gamma \vdash \forall x \varphi$, provided that parameter $a$a is “fresh” in the sense of having no other occurrences in $\Gamma , \varphi$

The proviso is consistent with the intuitive meaning of the rule: if $\varphi$ holds of an object $a$ whatever, then it holds of every object.
The proviso is needed in order to avoid the fallacy: John is  a Philosopher, therefore everything is a Philospher.
In your wrong proof above, you have committed exactly these fallacy: the parameter $a$ [in your case: John] must not occur in $\Gamma$. In your case $\Gamma = \{ P(\text {John}) \}$.
In conclusion, the issue is: how can you prove $\vdash P(\text {John})$?
Example: consider the first-order language of arithmetic with individual constants $0$ and $1$ and let $\mathsf {PA}$ the collection of first-order Peano axiom.
We have: $\mathsf {PA} \vdash (0 \ne 1)$,
Now, applying $(\forall \text I)$ to it, using $0$ as $\text {John}$, we conclude with:  $\mathsf {PA} \vdash \forall x (x \ne 1)$.
Where is the mistake ?
