<s>[INST] Given big rectangle of size $x, y$, count sum of areas of smaller rectangles. Let's say we have two integers $x$ and $y$ that describe one rectangle, if this rectangle is splitten in exactly $x\cdot y$ squares, each of size $1\cdot 1$, count the sum of areas of all rectangles that can be formed from those squares.
For example if $x = 2, y = 2$, we have $4$ rectangles of size $(1,1)$, $2$ rectangles of size $(1, 2)$, $2$ rectangles of size $(2, 1)$ and $1$ rectangle of size $(4,4)$. So the total answer is $4\cdot 1+ 2\cdot2 + 2\cdot2+1\cdot4 = 16$
Is there easy way to solve this for different $x$ and $y$?
 [/INST] It is useful to move from simpler cases to more complex ones!
Consider $1\times y$ rectangle. The sum of areas of all rectangles is:
$$\begin{align}A_{1\times y}&=1\times y+2\times (y-1)+3\times (y-3)+\cdots +y\times 1=\\
&=\sum_{i=1}^yi\cdot (y-i+1)=\\
&=(y+1)\sum_{i=1}^y i-\sum_{i=1}^yi^2=\\
&=(y+1)\cdot \frac{y(y+1)}{2}-\frac{y(y+1)(2y+1)}{6}=\\
&=\frac{y(y+1)[3y+3-2y-1]}{6}=\\
&=\frac{y(y+1)(y+2)}{6}.\end{align}$$
Consider $2\times y$ rectangle. The sum of areas of all rectangles is:
$$\begin{align}A_{2\times y}&=\color{red}{2}\times [1\times y+2\times (y-1)+3\times (y-3)+\cdots +y\times 1]+\\
&+\color{red}{1}\times [2\times y+4\times (y-1)+6\times (y-3)+\cdots +2y\times 1]=\\
&=\color{red}{2}\times [A_{1\times y}]+\color{red}{1}\times 2\times [A_{1\times y}]\\
&=(\color{red}2+\color{red}1\times 2)\times [A_{1\times y}]\\
&=4\cdot \frac{y(y+1)(y+2)}{6}.\end{align}$$
Consider $3\times y$ rectangle. The sum of areas of all rectangles is:
$$\begin{align}A_{3\times y}&=\color{red}{3}\times [1\times y+2\times (y-1)+3\times (y-3)+\cdots +y\times 1]+\\
&+\color{red}{2}\times [2\times y+4\times (y-1)+6\times (y-3)+\cdots +2y\times 1]+\\
&+\color{red}{1}\times [3\times y+6\times (y-1)+9\times (y-3)+\cdots +3y\times 1]=\\
&=(\color{red}{3}+\color{red}2\times 2+\color{red}1\times 3)\times [A_{1\times y}]=\\
&=10\cdot \frac{y(y+1)(y+2)}{6}.\end{align}$$
And now consider $x\times y$ rectangle. The sum of areas of all rectangles is:
$$\begin{align}A_{x\times y}&=\ \ \ \ \ \ \ \ \ \ \color{red}{x}\times [1\times y+2\times (y-1)+3\times (y-3)+\cdots +y\times 1]+\\
&+\color{red}{(x-1)}\times [2\times y+4\times (y-1)+6\times (y-3)+\cdots +2y\times 1]+\\
&+\color{red}{(x-2)}\times [3\times y+6\times (y-1)+9\times (y-3)+\cdots +3y\times 1]=\\
& \ \ \vdots\\
&+\ \ \ \ \ \ \ \ \ \ \ \color{red}{1}\times [x\times y+2x\times (y-1)+3x\times (y-3)+\cdots +xy\times 1]=\\
&=(\color{red}{x}+\color{red}{(x-1)}\times 2+\color{red}{(x-2)}\times 3+\cdots +\color{red}1\times x)\times [A_{1\times y}]=\\
&=[A_{x\times 1}]\cdot [A_{1\times y}]=\\
&=\frac{x(x+1)(x+2)}{6}\cdot \frac{y(y+1)(y+2)}{6},\end{align}$$
which complies with the brilliant answer given by Todor Markov (+1).
</s>