Another thing about the Dalton's law and gas mixtures is the partial pressure of the gas is proportional to its mol fraction.
Mol fraction is the "mol of a substance" / " the sum of mols". For example, let's there are 2 mols of N2, 3 mols of H2 and 5 mols of O2. Here, the mol fraction of O2 will be 5/10= 0.5.
In your first example, if there is a mixture of 5% Hydrogen / 95% Nitrogen in a 40L gas bottle with a final pressure of 150bar, the partial pressue of hydrogen should be 63.6 barr and that of nitrogen should be 86.4. However, if we mix nitrogen with partial pressure of 142.5 bar and hydrogen with 7.5 bar, the mass composition ratio will not be 5% hydrogen / 95% nitrogen.