Anderson just skipped a step or two to end up with \$R\$ in per unit. With \$P+jQ\$ in actual values (MW, MVAR) you first need to put them in per unit by dividing each by \$S_B\$. He just combined all that math into one equation.
$$R=\frac{V_{pu}^2\frac{P}{S_B}}{\frac{P^2+Q^2}{S_B^2}}=\frac{V_{pu}^2PS_B}{P^2+Q^2}$$
By the way, conversion from \$\bar{S}\$ to \$\bar{Z}\$ is fairly straight forward. In the following \$\bar{V}\$ is phase-phase voltage and \$\bar{S}\$ is three-phase.

Here are the familiar right-triangles,

We know that (using amplitudes, not phasors since we already know \$\theta\$),
$$|\bar{Z}|=\frac{V}{\sqrt3 I}=\frac{V}{\sqrt3}\times\frac{\sqrt3 V}{S}=\frac{V^2}{S}=\frac{V^2}{\sqrt{P^2+Q^2}}$$
Then, since
$$cos\theta=\frac{P}{S}\text{ and } sin\theta=\frac{Q}{S}$$
The results are,
$$R=Zcos\theta=\frac{V^2P}{P^2+Q^2}$$
and
$$X=Zsin\theta=\frac{V^2Q}{P^2+Q^2}$$
Examples:
The (very symmetric) conversion formulas,
$$P=\frac{V^2R}{R^2+X^2} \leftrightarrow R=\frac{V^2P}{P^2+Q^2}$$
$$Q=\frac{V^2X}{R^2+X^2} \leftrightarrow X=\frac{V^2Q}{P^2+Q^2}$$
Let \$P = 100\$MW, \$Q = 15\$MVAR, \$V = 160\$kV,
$$R=\frac{160^2\times100}{100^2+15^2}=250.4 \Omega$$
$$X=\frac{160^2\times15}{100^2+15^2}=37.6 \Omega$$
The figures etc. are based on my lecture slides. A good reference on \$PQ\leftrightarrow RX\$ conversion (and use) is “Visualizing Relay Loadability in the P-Q Plane”, Gary Kobet, 55th Annual Georgia Tech Protective Relay Conference, 2001.