I'm reading "Set Theory and the Continuum Problem" by Smullyan & Fitting, and on page 16 it says:
Thus, we allow $\forall x$ for $x$ a set variable, but not $\forall A$ for $A$ a class variable.
But right below that it states:
$P_2$ Separation$$(\forall A_1)\ldots(\forall A_n)(\exists B)(\forall c)[x \in B \iff \phi(A_1,\ldots,A_n)]$$
Intuitively, each axiom $P_2$ says that given any subclasses $A_1,\ldots,A_n$ of $V$ there...
So I'm confused. Why isn't this quantifying over class variables?
The first quote is regarding the definition of a first-order property, not a universal prohibition. The sentences of the axiom schema are not first-order sentences in this sense, but the formulas $\varphi$ that the schema ranges order are all the first-order formulas.
So in other words, what they mean is that for each formula of the form $\varphi(A_1,\ldots, A_n, x)$ that does not include any class quantifiers, $$ \forall A_1\ldots \forall A_n\exists B\forall x(x\in B\iff \varphi(A_1,\ldots, A_n,x))$$ is an axiom. (Note that they should have also stipulated that $\varphi$ does not contain the variable $B$.)
On the general question of "is this first or second-order logic?", even though we talk about class variables as "2nd-order variables" as the classes over which they range are informally collections of sets, NBG is a first-order theory. One can either consider it as a two-sorted first-order theory, or a one-sorted theory where sets are a special type of class (I can't tell which one the authors are using as they are being pretty informal about it).
What gives away that it's first-order isn't that the separation schema ranges over first-order predicates, but that it's a schema... in a full-on second-order theory, we would be able to quantify over "all properties", and we wouldn't need a separation schema. (Morse-Kelley is a stronger theory that allows all formulas in its separation schema, but is still considered first order.)
Sometimes people do say it is second-order theory, but emphasize that Henkin semantics is intended. (But then, it's common to call Henkin semantics "first-order semantics for second-order languages.") This is sort of like how in reverse mathematics you see the words "second-order arithmetic" all the time, but the theories of study really are using Henkin semantics or are first-order theories, depending on how you look at it. In fact, the relationship between ACA$_0$ and PA bears several similarities to the relationship between NBG and ZFC. ("Arithmetical comprehension" is analogous to "first-order separation".)