I would like someone to verify my proof of the following claim, which I have been using to solve some problems about proving series identities in Ch. 11 of Apostol's analytic number theory text. Let $f$ and $g$ be multiplicative arithmetic. Then the arithmetic function $$h(n) = \sum_{d^2 \mid n}f(d)g(n/d^2)$$ is multiplicative.
Suppose $(m,n) = 1$. We have \begin{equation*} \begin{aligned} h(m)h(n) &= \mathrel{\phantom{=}} \sum_{q^2 \mid m}f(q)g(m/q^2)\sum_{d^2 \mid n}f(d)g(n/d^2) \\ &= \sum_{q^2 \mid m, d^2 \mid n}f(q)f(d)g(m/q^2)g(n/d^2) \\ &= \sum_{q^2d^2 \mid mn}f(qd)g(mn/q^2d^2) \\ &= \sum_{d^2 \mid mn}f(d)g(mn/d^2) \\ &= h(mn), \end{aligned} \end{equation*} where we use the multiplicativity of $f$ and $g$ in the third equality and in the fourth equality we use the fact that $(m,n) = 1$ implies that specifying a pair $(q^2,d^2)$ with $q^2 \mid m$ and $d^2 \mid n$ is equivalent to specifying a square divisor of $mn$.
Thanks!