Energy order of sub-shell decided by (n+l) value.
Greater the (n+l) value of a sub-shell greater is its energy.
If two sub-shells have same (n+l) values the orbital with greater principal quantum number has greater energy
A⇒3d⇒(n+l)=3+2=5
B⇒4p⇒n+l=4+1=5
C⇒4d⇒n+l=4+2=6
D⇒3s⇒(n+l)=3+0=3
D<A<B<C