Electron configurations for d-block and p-block
I did not completely understand you question here, but I am gonna give it a try, so maybe I might answer your question.

I do not think that it matters how you write them, but its just depends on how you fill them. The order for filling orbitals is as follows: 
$$\ce{1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p, 8s}$$

In high school, I just used to write the $(n+1)s$ before the $nd$. Because with some exceptions, the rule says that you will always fill the $(n+1)s$ orbital before you fill the $nd$ orbital. Meaning that you fill $\ce{4s}$ before you fill $\ce{3d}$, $\ce{5s}$ before you fill $\ce{4d}$, and so on.

The reason is that the $\ce{s}$ actually has a lower energy than the $\ce{d}$ orbital. You wrote that wrong in your question. That is the only you fill the s before the d, and when you make ions, you will have to remove the electrons from s before you do from $\ce{d}$.

But like I said, you can write them like you want as long as you have filled them correctly in the right order. Likewise once you have completely filled your $ns$, only then you can move to fill the $(n-1)d$ orbital and then again proceed to fill the $\ce{np}$ orbital. Its just how we fill them.

In some books, you will find that they write the s as the outermost but some write d as the outermost. Frankly, in my book and myself have learned to write $\ce{d}$ at the end. But I do not think that writing it matters.

For example, take a look at this site. They write $s$ orbital at the end of the configuration and also note the energy diagram. But in the following Wikipedia website, they have written the $\ce{d}$ at the end instead of $\ce{s}$. So basically, the writing of the orbitals doesnt matter, but the order of filling matters.