A quicker route is to count the mismatch equations directly, since the Jacobian's size always equals the number of these equations.
Real power mismatch equations are written for every bus except the slack bus, since the slack bus absorbs any power imbalance and never has a mismatch equation of its own. This gives $N-1$ real power equations.
Reactive power mismatch equations are written only for the load (PQ) buses, since every generator bus (including all $P-1$ non-slack PV buses) has its reactive power left free and its voltage magnitude fixed instead. With no reactive limit violations, none of these generator buses ever needs a reactive equation. This gives $Q$ reactive power equations.
Adding the two counts, the total number of equations, and hence the Jacobian's dimension, is:
\[ (N-1)+Q \]Writing $Q$ in terms of $N$ and $P$ using $N=P+Q$:
\[ Q=N-P \]so the total becomes:
\[ (N-1)+(N-P)=2N-1-P \]This matches option (B) exactly.
\[ \boxed{(2N-1-P)\times(2N-1-P)} \]