The step from (1.1) to (1.2) can be split into three smaller steps,
each similar to one of three steps into which the step before (1.1) can be split:
\begin{align*}
& \phantom{{}={}} \sum_{dd'=n}\mu(d)\sum_{m|d'}g(m) \\
& = \sum_{dd'=n}\mu(d)\sum_{mh=d'}g(m) \\
& = \sum_{dd'=n}\;\sum_{mh=d'}\mu(d)g(m) \\
& = \sum_{dmh=n}\mu(d)g(m) \tag{1.1} \\
& = \sum_{mh'=n}\;\sum_{dh=h'}\mu(d)g(m) \\
& = \sum_{mh'=n}g(m)\sum_{dh=h'}\mu(d) \\
& = \sum_{mh'=n}g(m)\sum_{d|h'}\mu(d) \tag{1.2}
\end{align*}
If the step before (1.1) was already clear, then the step from (1.1)
to (1.2) should now also be clear.
That does not mean that even the smaller steps are trivial, however!
You may still have questions about the validity of such arguments in
general. If so, then you are right to do so, because it is not at
all easy to find references on the subject, and proofs of general
results of this type ought to be seen by everybody at least once in
their lives (even if only then to be quickly forgotten).
Each of the smaller steps can be justified by a general rule for
calculating with finite sums. (If I haven't slipped up, that is. My
concentration is not great at the moment, so please do point out any
steps that remain obscure, and I'll try to fix them.) Most of these
general rules are spelled out by Terence Tao in Analysis I (2006), section 7.1.
There is sometimes a need for a more general version of Tao's rule
7.1.11(e). The only references I have for such a general rule (one
is by Bourbaki, the other was written by me as an answer in Maths.SE
last year) are both pretty hard to read. Fortunately, all that is
needed in many cases is Tao's slightly less general Lemma 7.1.13, or
Corollary 7.1.14: "Fubini's theorem for finite series".
Less fortunately, it is the more general rule that is needed twice in the
above derivation, to justify the steps immediately before and after (1.1).
I won't state such a rule in full generality, because I went over
the top doing so in an answer to my
question on the
subject last year (and even that could be generalised a bit more).
A slimmed-down version of the rule will do. Let $K$ be a finite
set, $(A_k)_{k \in K}$ a pairwise disjoint family of finite sets,
$B = \bigcup_{k \in K}A_k,$ and $u \colon B \to \mathbb{C}$ a
function. Then
$$
\sum_{b \in B}u(b) = \sum_{k \in K}\sum_{a \in A_k}u(a).
$$
Let $n$ be a positive integer, and define:
\begin{align*}
K & = \{m \in \mathbb{N} : m \mid n\}, \\
A_m & = \{(m, d, h) \in \mathbb{N}^3 : mdh = n\} && (m \in K), \\
B & = \{(m, d, h) \in \mathbb{N}^3 : mdh = n\}, \\
u(m, d, h) & = \mu(d)g(m) && ((m, d, h) \in B).
\end{align*}
Then the rule just given (in conjunction with some simpler rules
that I haven't stated, but that are stated in Tao's book) justifies
the step immediately after (1.1).
If I can find time (it's not likely to happen today), I'll try to
expand this answer by quoting all of the other rules that have
implicitly been appealed to in the above derivation, and showing how
they can be applied explicitly. (That is, unless someone begs me to
stop!) :)
Three rules have been applied. They are:
($\alpha$)
Let $A$ and $B$ be finite sets, $\theta \colon A \to B$ a bijection,
and $u \colon B \to \mathbb{C}$ a function. Then
$$
\sum_{a \in A}u(\theta(a)) = \sum_{b \in B}u(b).
$$
($\beta$)
Let $A$ be a finite set, $u \colon A \to \mathbb{C}$ a function, and
$c$ a complex number. Then
$$
\sum_{a \in A}cu(a) = c\sum_{a \in A}u(a).
$$
($\gamma$)
Let $K$ be a finite set, $(A_k)_{k \in K}$ a pairwise disjoint
family of finite sets, $B = \bigcup_{k \in K}A_k,$ and
$u \colon B \to \mathbb{C}$ a function. Then
$$
\sum_{b \in B}u(b) = \sum_{k \in K}\sum_{a \in A_k}u(a).
$$
The derivation has six steps.
The first step uses rule ($\alpha$), with
\begin{align*}
A & = \{(m, h) \in \mathbb{N}^2 : mh = d'\}, \\
B & = \{m \in \mathbb{N} : m \mid d'\}, \\
\theta(m, h) & = m && ((m, h) \in A), \\
u(m) & = g(m) && (m \in B).
\end{align*}
The second step uses rule ($\beta$), with
\begin{align*}
A & = \{(m, h) \in \mathbb{N}^2 : mh = d'\}, \\
u(m, h) & = g(m) && ((m, h) \in A), \\
c & = \mu(d).
\end{align*}
The third step uses rule ($\gamma$), with
\begin{align*}
K & = \{d \in \mathbb{N} : d \mid n\}, \\
A_d & = \{(m, d, h) \in \mathbb{N}^3 : mdh = n\} && (d \in K), \\
B & = \{(m, d, h) \in \mathbb{N}^3 : mdh = n\}, \\
u(m, d, h) & = \mu(d)g(m) && ((m, d, h) \in B).
\end{align*}
At the same time, the third step uses rule ($\alpha$), with
\begin{align*}
A & = \{(m, h) \in \mathbb{N}^2 : mh \mid n\}, \\
B & = \{(m, d, h) \in \mathbb{N}^3 : mdh = n\}, \\
\theta(m, h) & = (m, n/(mh), h) && ((m, h) \in A), \\
u(m, d, h) & = \mu(d)g(m) && ((m, d, h) \in B).
\end{align*}
If this is confusing, it is because the notation in use, although it
is compact, convenient, and perfectly standard, does not permit the
application of rule ($\alpha$) to be represented
explicitly in this instance. (But I'll think some more about this,
and edit the answer again, if I or someone else can come up with a
clearer way to represent this step of the derivation. The important
thing is to represent it in terms of general rules in some
way; but this may not be the best way.)
The fourth step also uses rule ($\gamma$), as was
explained in the part of the answer written yesterday.
At the same time, it uses rule ($\alpha$), with
\begin{align*}
A & = \{(d, h) \in \mathbb{N}^2 : dh \mid n\}, \\
B & = \{(m, d, h) \in \mathbb{N}^3 : mdh = n\}, \\
\theta(d, h) & = (n/(dh), d, h) && ((d, h) \in A), \\
u(m, d, h) & = \mu(d)g(m) && ((m, d, h) \in B).
\end{align*}
The fifth step uses rule ($\beta$), with
\begin{align*}
A & = \{(d, h) \in \mathbb{N}^2 : dh = h'\}, \\
u(d, h) & = \mu(d) && ((d, h) \in A), \\
c & = g(m).
\end{align*}
The sixth and final step uses rule ($\alpha$), with
\begin{align*}
A & = \{(d, h) \in \mathbb{N}^2 : dh = h'\}, \\
B & = \{d \in \mathbb{N} : d \mid h'\}, \\
\theta(d, h) & = d && ((d, h) \in A), \\
u(d) & = \mu(d) && (d \in B).
\end{align*}
Of course, one can work through such derivations intuitively and
confidently without splitting them up into tiny steps like this!
But it helps to demystify the logic of such arguments if one knows
they can be reduced to applications of a few simple and general
rules, whose truth is entirely obvious. (Their proofs need not be
remembered, although they should be seen at least once.) And where
difficulties arise, I think it can be of practical help to make some
of the applications of the rules explicit, even if not at this
painful level of detail.