Prove that $ a_{1}^{3}+a_{2}^{3}+\cdots+a_{l}^{3}=\left(a_{1}+a_{2}+\cdots+a_{l}\right)^{2} $ 
Let $ d_{1}, d_{2}, \ldots, d_{l}$ be all positive divisors of a positive integer $n$. For
each $i=1,2, \ldots, l$ denote by $a_{i}$ the number of positive divisors of $d_{i}$. Then
$
a_{1}^{3}+a_{2}^{3}+\cdots+a_{l}^{3}=\left(a_{1}+a_{2}+\cdots+a_{l}\right)^{2}
$

Solution. hint says, we have to use this but I am not getting why these both are true ???
$
\begin{aligned}
a_{1}+a_{2}+\cdots+a_{l} &=\sum_{d \mid n} \tau(d)=\prod_{i=1}^{k}\left(1+\tau\left(p_{i}\right)+\cdots+\tau\left(p_{i}^{\alpha_{i}}\right)\right) \\
a_{1}^{3}+a_{2}^{3}+\cdots+a_{l}^{3} &=\sum_{d \mid n} \tau(d)^{3}=\prod_{i=1}^{k}\left(1+\tau\left(p_{i}\right)^{3}+\cdots+\tau\left(p_{i}^{\alpha_{i}}\right)^{3}\right)
\end{aligned}
$
 A: See Proposition 1 in Sum of Cubes is Square of Sum by Barbeau and Seraj. Here's the quoted proof:

The proposition is clearly true for prime powers since for each prime $p$ and each natural $n$, the corresponding set of $p^{n-1}$ is
$$\langle\tau(p^0), \tau(p^1), \ldots, \tau(p^{n-1})\rangle=\langle 1,2,\ldots,n\rangle.$$
$\tau$ is well-known to be a multiplicative function, meaning that if $a,b$ are relatively prime integers then $\tau(ab)=\tau(a)\tau(b).$ By elementary multiplicative number theory, the functions
\begin{align*}
f(n)&=\sum_{d\mid n}{\tau(d)},\\
F(n)&=\sum_{d\mid n}{[\tau(d)}]^3
\end{align*}
must also be multiplicative. All we need now is that $F(n)=[f(n)]^2$. Since this is already true for prime powers, the rest follows from the prime factorization of $n$ and the multiplicative property of $f$ and $F$.

The result is attributed to Liouville. Disclosure: I'm one of the authors, and I have no issues with the proof in the paper being quoted here. See here for why the sum of a multiplicative function over divisors of the input is multiplicative. Of course, a multiplicative function to a positive integer exponent is also multiplicative.
