[guided]The strategy for proving equalities between stochastic integrals in $\mathcal{M}^2_c$ is always the same: show both sides have the same bracket against all test martingales $N \in \mathcal{M}^2_c$, then invoke the uniqueness from part (ii) of the [Itô Isometry](/theorems/2092).
For $K \cdot (H \cdot M)$, we apply the bracket identity twice. The first application peels off the outer integrand $K$:
\begin{align*}
\langle K \cdot (H \cdot M), N \rangle_t = \int_0^t K_s \, d\langle H \cdot M, N \rangle_s.
\end{align*}
The second application peels off the inner integrand $H$ from the bracket $\langle H \cdot M, N \rangle$:
\begin{align*}
\langle H \cdot M, N \rangle_s = \int_0^s H_u \, d\langle M, N \rangle_u.
\end{align*}
Combining via the chain rule: $d\langle H \cdot M, N \rangle_s = H_s \, d\langle M, N \rangle_s$, so $\int_0^t K_s \, d\langle H \cdot M, N \rangle_s = \int_0^t K_s H_s \, d\langle M, N \rangle_s$.
For $(KH) \cdot M$, the bracket identity applies in one shot: $\langle (KH) \cdot M, N \rangle_t = \int_0^t K_s H_s \, d\langle M, N \rangle_s$.
Both expressions equal $\int_0^t K_s H_s \, d\langle M, N \rangle_s$ for all $N$. By the uniqueness in part (ii) of the [Itô Isometry](/theorems/2092), the two processes $K \cdot (H \cdot M)$ and $(KH) \cdot M$ are indistinguishable.
Note that the whole argument is the "algebraic" counterpart of the chain rule: integrating $K$ against an integral of $H$ against $d\langle M, N \rangle$ is the same as integrating $KH$ directly. The stochastic integral inherits this property from the Lebesgue–Stieltjes integral because the bracket identity reduces everything to pathwise Lebesgue–Stieltjes integrals.[/guided]