Boost Voltage before Regulating or vice versa
It's probably best to use two circuits in parallel.

One regulates down from the input to 5 V.

The other boosts up from the input to 12 V.

If you use them cascaded like you propose, the power of one of your loads is subject to inefficiency effects from both regulators.

Also consider that using a linear regulator to get from ~10 V input to 5 V output is only about 50% efficient and the regulator is likely to need a heat sink if the load is more than a few 10's of milliamps. A buck switching regulator could be 90% efficient.