(With the homogenization of $\sum a_i = kn$.)
First, we consider the $ k = 2, n = 2$ case.
Suppose $ a + b + c + d = 4, a \leq b \leq c \leq d$, we want to show that $ ac + bd \leq 2$.
Intuitvely, if $a \leq d$ are fixed, we'd want to increase $b$ and decrease $c$ subject to $ b \leq c $.
Hence, we replace $(a, b, c, d)$ with $ ( a , \frac{b+c}{2}, \frac{b+c}{2}, d)$, which only increases the value.
This becomes $ a \times \frac{b+c}{2} + \frac{b+c}{2} \times d = (a+d)(b+c) / 2$, which by AM-GM, we know it has a maximum value of $2$, hence we are done.
Equality occurs when $ a + d = b+c = 2$ and $ b = c ( = 1)$. EG $(0, 1, 1, 2)$ and $(1, 1, 1, 1)$ are equality cases.
Note: The hint about the equality condition is that it encourages you to realize that $a+d = b+c = 2$, and so we'd want to force that out somehow.Otherwise, one might think of $(a+b)(c+d)$ instead, but that doesn't help us classify the equality cases, nor have I had success exploring that path.
Now we consider the $k = 3, n = 2$ case.
Suppose $ a + b + c + d + e + f = 6, a\leq b \leq c \leq d \leq e \leq f$, we want to show that $ ace + bdf \leq 2$.
If $a, d, e, f$ are fixed, then since $a \leq d, e\leq f$ so $ae \leq df$ and we'd want to increase $b$ and decrease $c$ subject to $ b \leq c$.
Similarly, if $a, b, c, f$ are fixed, since $ac \leq bf$, we'd want to increase $d$ and decrease $e$ subject to $ d \leq e$.
Thus, we replace $(a, b, c, d, e, f)$ with $(a, \frac{b+c}{2}, \frac{b+c}{2},\frac{d+e}{2}, \frac{d+e}{2},f )$, which only increase the value.
Again, the expression becomes $(a+f)(b+c)(d+e) / 4$, which by AM-GM has a maximum value of 2, and we are done.
Equality holds when $ a +f = b + c = d+e = 2, b = c ( = 1), d = e (= 1)$.
Now we consider the $k = 2, n = 3 $ case.
Suppose $ a +b + c + d + e + f = 6 , a\leq b \leq c \leq d \leq e \leq f,$ we want to show that $ ad + be + cf \leq 3$.
If $ a \leq f$ are fixed, we'd want to decrease d, increase c subject to $ c \leq d$.
Thus we replace $(a, b, c, d, e, f)$ with $(a, b, \frac{c+d}{2}, \frac{c+d}{2}, e, f)$.
- If $ b+e \geq c+d$, then we'd want to replace $(b, e)$ with $(\frac{c+d}{2}, b+e - \frac{c+d}{2})$. Then, we're maximizing $(c+d)/2 \times (6 - 3*(c+d)/2) $, which has a maximum of $3$ wen $ (c+d)/2 = 1$.
- Otherwise, if $b+e < c+d$, then we'd want to replace $(b, e) $ with $( b+e - \frac{c+d}{2}, \frac{c+d}{2} )$. Then, we're likewise maximizing $(c+d)/2 \times (6 - 3*(c+d)/2)$, which has a maximum of $3$ when $(c+d)/2 = 1$.
The equality cases are
- $(a, b, 1, 1, 1, f)$ subject to $ a \leq b \leq 1 \leq f$, $a+b+f = 3$.
- $(a, 1, 1, 1, e, f)$ subject to $ a \leq 1 \leq e \leq f$, $a+e+f = 3$.
I leave you to generalize this, in the exact same way as shown above.
Maybe think about the $ k = 3, n = 3$ case, how can we use the above ideas?
Once you've done that, please post a general solution.