Solution (source code)

= Solution
{c}

Set $x=B^2/S$ and $q=(S/B)^\alpha$, so $W=qV(t,x)$. Direct differentiation gives
$$
W_t=qV_t,\qquad SW_S=q(\alpha V-xV_x),
$$
$$
S^2W_{SS}=q\left[\alpha(\alpha-1)V+
2(1-\alpha)xV_x+x^2V_{xx}\right].
$$
Substitute into the <Black-Scholes equation> and divide by $q$:
$$
\frac{\mathcal LW}{q}=V_t+\tfrac12\sigma^2x^2V_{xx}
+[\sigma^2(1-\alpha)-r]xV_x
+[\tfrac12\sigma^2\alpha(\alpha-1)+r\alpha-r]V.
$$
To recover the same operator on $V$, its first-derivative coefficient must be $r$. This gives
$$
\boxed{\alpha=1-\frac{2r}{\sigma^2}.}
$$
For this choice the last coefficient is $-r$, since $\tfrac12\sigma^2(\alpha-1)+r=0$. Hence $\mathcal LW=q\mathcal LV=0$, proving the required invariance. The transformation is the <stock-inversion reflection for the Black-Scholes equation>.