The reason for:
$$38=\sum_{1\le y\le x\le 3}2x+y \,\,\,\not\!\!\!\!\implies\sum_{y=1}^x\sum_{x=1}^32x+y\space\space =\frac{27x+3x^2}{2}$$
is that both $x,y$ are ultimately constrained between $1$ and $3$ on the LHS, while on the RHS the variable $x$ is constrained between $1$ and $3$ (and as a rule the inner sum is calculated before the outer sum), however $y$ is constrained between $1$ and $x$ and $x$ is no longer constrained implying $y$ is not constrained, which contradict the constraint ($y\le 3$) of the LHS.
In general:
$$\sum_{1\le y\le x\le 3}2x+y \,\,\,\not\!\!\!\!\implies$$
$$\sum_{y=1}^x\sum_{x=1}^32x+y \ \ \ \ or \ \ \ \sum_{x=y}^3\sum_{y=1}^32x+y \ \ \ \ or \ \ \ \sum_{x=1}^3\sum_{y=1}^32x+y \ \ \ \ or \ \ \ \sum_{y=1}^3\sum_{x=1}^32x+y$$
Note: The same rules apply to the double integrals.