Consider the following problem:
Gandalf, Saruman and Radagast go to a bank together. There are two open counters which Gandalf and Saruman immediately go to get their service. Radagast goes to the first counter that becomes available after that. Each of them independently takes an exponentially distributed amount of time (with parameter λ) to get their service from the counter. Each one of them leaves the bank immediately after getting their service. Find the probability distribution of the time that Radagast spends in the bank (you can provide either the distribution, the density, or the moment generating function).
Here is a solution provided for reference:

Although it is clear to me how the order of integration is chosen in the intermediate steps determining P(min(X,Y) < a), of which I believe is due to the fact that the inner integrals always have the tighter conditions, restrictions, or the smaller domains, I am having difficulty understanding how the order of integration is chosen in the intermediate steps that eventually determine P(T < a). I tried to integrate with respect to du from u = 0 to u = a-z, before integrating the result with respect to dz from z = 0 to z = a. However, I couldn't get the same answer as what is written in the solution. Does the order of integration matter that much (will I get a different solution if I start integrating with respect to a wrong variable, or is there something wrong with the limits that I have chosen?), and if so, why is the order of integration chosen in this way for the second part (P(T < a)?
More importantly, is there ever a general way to determine the order of integration and the limits involved, given questions like this (other examples include the problem of finding the probability density function of two people or two vehicles meeting each other within a certain time interval or distance interval)? Or does logic and pure reasoning come into place? My class instructor often treats such intermediate steps as if they are of common knowledge, and he tends to skip or occasionally go very briefly through them, but the subtleties are where the difficult parts lie for me...
Any assistance/explanation would be greatly appreciated! (pardon the lengthy description!) Thank you!