The price of the option is $$C_0=E\left[e^{-\int_{0}^{T}{r_sds}} \left(S_T^2-K\right)^+\right]$$ where $r$ is the risk free rate, $E$ is the expectation under the risk-neutral measure.
Define the process $U_t=S_t^2$ and apply Ito's lemma
$$dU_t=2S_tdS_t+d<S_t,S_t>$$
The assumption of Black-scholes implies that the process $r$ is constant and the process $S_t$ follows :
$$dS_t=rS_tdt+\sigma S_t dW_t$$
Therefore,
$$dU_t=2rS_t^2dt+2\sigma S_t^2 dW_t+\sigma^2S_t^2dt$$
$$dU_t=(2r+\sigma^2)U_tdt+2\sigma U_t dW_t$$
We define $$\bar{r}=2r+\sigma$$ $$\bar{\sigma}=2 \sigma$$
Finally, we have
$$dU_t=\bar{r}U_tdt+\bar{\sigma} U_t dW_t$$
and the option price is $$C_0=E\left[e^{-\int_{0}^{T}{r_sds}} \left(U_T-K\right)^+\right]$$
You can use your Black-Scholes formula for the process $U_t$, and get the option formula.
EDIT ::
Why do we use the forward ?
The reason is that the forward underlying is usually defined in a way that it is a martingale under its natural measure, therefore we just need to define its volatility. Let start from the first equation, and let assume that the rate is stochastic.
The price of the option is $$C_0=E\left[e^{-\int_{0}^{T}{r_sds}} \left(S_T^2-K\right)^+\right]$$
Introducing the zero-coupon bond $$P(t,T)=E\left[e^{-\int_{t}^{T}{r_sds}} |\mathcal{F_t}\right]$$. $\mathcal{F}$ is the market filtration.
We can price the option as
$$C_0=P(0,T)E^T\left[ \left(S_T^2-K\right)^+\right]$$
where $E^T$ is the expectation under the measure associated to the bond (called the T-forward measure).
Let's define the forward function as $$F_T(t)=E^T\left[S_T | \mathcal{F_t}\right]$$,
Obviously $F_T(T)=S_T$ and $F_T(t)$ is a martingale under the $T$-forward measure by construction( it is a conditional expectation).
The price of the option becomes :
$$C_0=P(0,T)E^T\left[ \left(F_T(T)^2-K\right)^+\right]$$
So far, as you can see , I have not introduced any model , and inside the expectation terms, we only have one random variable, and it is a martingale. This is why using the forward underlying is very powerful.
We can keep going , let assume that the forward underlying is a geometrical Brownian motion $$dF_T(t)=\sigma F_T(t)dW_t$$ where $W$ is a Brownian motion under the $T$-forward measure.
or
$$F_T(T)=F_T(0)e^{-\frac{1}{2}\sigma^2T+\sigma W_T}$$
You can finish the proof using Black-Scholes with $r=0$
We have the price of the option without assuming that the rate is deterministic/constant. In the rate world, where rates are stochastic, we must work with forward underlying to avoid having complex payoff. In the Black-Scholes world, I can understand that introducing the forward seems irrelevant. Btw, Mark Joshi (RIP) was a rate quant, that may explain why he did that.
Now, we need to calculate $F_T(0)$
$$F_T(0)=E^T\left[S_T \right]=E^T\left[\frac{S_T}{P(T,T)}\right]=\frac{S_0}{P(0,T)}$$
Finally, if you assume that rate is constant, we have
$$P(0,T)=e^{-rT}$$