First sketch the are over which you are performing the integral. In the first integral, note that your $U$ goes from $0$ to $E$ and then $E$ goes from $0$ to $a$. This is shown in the figure below. The $X$ axis is the $E$ axis and the $Y$ axis is the $U$ axis. The inclined line is the line $U=E$. The vertical line at $E = 5$ is in general the line $E = a$. The small shaded vertical strip in the middle represent $U$ going from $0$ to $E$. Integrating over the strip corresponds to the inner integral of the first integral you have i.e. $\displaystyle \int_{U=0}^{U=E}$. For the outer integral, $\displaystyle \int_{E=0}^{E=a}$, $E$ goes from $0$ to $a$. Hence, in essence you are integrating over the triangle shown below by integrating over vertical strips and moving the vertical strips horizontally.

Now changing the order of integration essentially is the same as integrating over horizontal strips and moving the horizontal strips vertically as shown in the figure below.
Now note that to integrate over a horizontal strip, you integrate $E$ from $U$ to $a$. Then move the horizontal strip vertically which corresponds to $U$ going from $0$ to $a$.
Hence, $\int_{E=0}^{E=a} \int_{U=0}^{U=E} (\cdot) dU dE = \int_{U=0}^{U=a} \int_{E=U}^{E=a} (\cdot) dE dU$
You should also look here to see how the double integral is evaluated by changing the order of integration.