Caveat: This may not be the most direct way of doing it.
Write $n=p_1^{a_1}\cdots p_k^{a_k}$ with $p_i$ pairwise distinct primes. Since the Moebius function is zero at any non-square-free integer, the only divisors that matter are those which are products of some pairwise distinct $p_i$.
Since $\sigma(p_{i_1}\cdots p_{i_r}) = \prod_{j=1}^r \sigma(p_{i_j}) = \prod_{j=1}^{r}(1+p_{i_j}),$ then the sum on the left hand side is the sum of these products, with a minus sign if the number of factors is odd, and a plus sign if the number of factors is even.
Let $x_i = 1 + p_i$. Let $S_r(x_1,\ldots,x_k)$ is the $r$th elementary symmetric polynomial on $x_1,\ldots,x_r$; that is, \begin{align*} S_0(x_1,\ldots,x_k) &= 1,\\ S_1(x_1,\ldots,x_k) &= x_1+\cdots + x_k,\\ S_2(x_1,\ldots,x_k) &= x_1x_2 + \cdots + x_1x_k + x_2x_3+\cdots + x_{k-1}x_k,\\ &\vdots\\ S_k(x_1,\ldots,x_k) &= x_1\cdots x_k. \end{align*}
Therefore: $\sum_{d|n}\mu(d)\sigma(d) = \sum_{r=0}^k (-1)^rS_r(x_1,\ldots,x_k).$
Now consider the polynomial $(t-x_1)\cdots(t-x_k)$. The coefficient of $t^i$ is precisely $(-1)^{k-i}S_{k-i}(x_1,\ldots,x_k)$. Thus, the sum on the right hand side is this polynomial evaluated at $t=1$. Therefore, $\sum_{d|n}\mu(d)\sigma(d) = \sum_{r=0}^k(-1)^rS_r(x_1,\ldots,x_k) = (1-x_1)\cdots(1-x_k) = \prod_{i=1}^k(1-x_i).$ But $1-x_i = 1-(1+p_i) = -p_i$. Therefore, $\sum_{d|n}\mu(d)\sigma(d) = \prod_{i=1}^k(-p_i) = (-1)^k\prod_{i=1}^kp_i,$ as claimed.