There are formula's available for pipes.. in books and on the net.
The problem with these formulas is that they are generally made for high performance racing engines.. which mopeds are not.
There are also software programs you can buy to have a computer do all the figuring after you input your engines variables.
I have calculated and built my own pipes twice.. and have measured several tuned pipes made by commercial performance companies to see how they compare to book formulas.
One thing you might consider is to copy a BiTurbo.
On the MacDizzy site.. go to 'Engine Building Formulas' for a basic pipe calc formulaI