3V and 5V supply Topology (Embedded Design, Mixed Signal)
B is better- you're not directly injecting digital noise into your precision analog supply. 

It might be even better to draw the 3.3V supply directly from the input supply. For example, a single BJT (emitter follower) from the 5.5V regulator will give you a bit under 5V out, which your 3.3V LDO can easily handle (assuming it can't handle 40V directly). That will also reduce the dissipation in the 5.5V LDO (do you really have to call it that close, and do you really need an LDO in this position?).