I am trying to figure out a question I have come across using Riemann Zeta function and Dirichlet generating functions. The function I am given is $$\sum_{d|n} \mu(d)^2 = g(n),$$
we have,$$\sum_{n=1}^{\infty} \frac{g(n)}{n^s} = \zeta(s) \sum_{n=1}^{\infty} \frac{\mu(n)^2}{n^s}.$$ I understand this step, however its the next step where they simplify into Riemann zeta functions where $$\zeta(s) \sum_{n=1}^{\infty} \frac{\mu(n)^2}{n^s}= \zeta(s) \frac{\zeta(s)}{\zeta(2s)},$$ Once again I know $\sum_{n=1}^{\infty} \frac{\mu(n)}{n^s}=\frac{1}{\zeta(s)} $ but still I am confused please may someone explain this for me.
When dealing with multiplicative functions, it is often easier to see what's going on if one looks at the Euler product. The function $n \mapsto \mu(n)^2$ is multiplicative (pointwise products of multiplicative functions are again multiplicative, and $\mu$ is multiplicative), so let's look at the Euler product:
\begin{align} \sum_{n = 1}^{\infty} \frac{\mu(n)^2}{n^s} &= \prod_p \Biggl(\sum_{k = 0}^{\infty} \frac{\mu(p^k)^2}{p^{ks}}\Biggr) \\ &= \prod_p \biggl(1 + \frac{1}{p^s}\biggr) \end{align}
since $\mu(p^k)^2 = 1$ if $k \leqslant 1$ and $\mu(p^k)^2 = 0$ if $k \geqslant 2$.
Now we write the factors in the Euler product as
$$1 + \frac{1}{p^s} = \frac{\bigl(1 + \frac{1}{p^s}\bigr)\bigl(1 - \frac{1}{p^s}\bigr)}{1 - \frac{1}{p^s}} = \frac{1 - \frac{1}{p^{2s}}}{1 - \frac{1}{p^s}}$$
and see
$$\sum_{n = 1}^{\infty} \frac{\mu(n)^2}{n^s} = \prod_p \frac{1 - \frac{1}{p^{2s}}}{1 - \frac{1}{p^s}} = \frac{\zeta(s)}{\zeta(2s)}\,.$$