$\mu\_1$ and $\mu\_2$ are means of two groups, while $\mu$ is the overall mean.

I feel like this can be done with some basic algebra I've forgotten, but I'm not sure.

Here is some more context:

$$
f = \frac{\sqrt{\dfrac{\sum\_{j}{(\mu\_j - \mu)^{2}}}{J}}}{\sigma\_{y}}
$$
which with two groups (J=2) reduces to:
$$
f = \frac{\sqrt{\dfrac{(\mu\_{1} - \mu)^{2} + (\mu\_{2} - \mu)^{2}}{2}}}{\sigma\_{y}}
$$